first commit
This commit is contained in:
116
wp-content/themes/solarify/image.php
Normal file
116
wp-content/themes/solarify/image.php
Normal file
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying image attachments
|
||||
*/
|
||||
|
||||
get_header();
|
||||
|
||||
// Retrieve attachment metadata.
|
||||
$metadata = wp_get_attachment_metadata();
|
||||
$column_classes = solarify_get_columns_classes(); ?>
|
||||
<div id="content" class="<?php echo esc_attr( $column_classes['main_column_class'] ); ?> content-area image-attachment">
|
||||
<?php
|
||||
// Start the Loop.
|
||||
while ( have_posts() ) : the_post();
|
||||
?>
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class("with_padding big-padding with_background"); ?>>
|
||||
<div class="entry-content">
|
||||
<div class="entry-attachment bottommargin_30">
|
||||
<div class="attachment ">
|
||||
<?php solarify_the_attached_image(); ?>
|
||||
</div><!-- .attachment -->
|
||||
|
||||
<?php if ( has_excerpt() ) : ?>
|
||||
<div class="entry-caption">
|
||||
<?php the_excerpt(); ?>
|
||||
</div><!-- .entry-caption -->
|
||||
<?php endif; ?>
|
||||
</div><!-- .entry-attachment -->
|
||||
<header class="entry-header side-meta">
|
||||
|
||||
<div class="entry-meta darklinks grey">
|
||||
<?php
|
||||
if ( 'post' == get_post_type() ) {
|
||||
printf( '<span class="entry-date"><i class="fa fa-clock-o" aria-hidden="true"></i> <a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a></span>',
|
||||
esc_url( get_permalink() ),
|
||||
esc_attr( get_the_date( 'c' ) ),
|
||||
esc_html( get_the_date() )
|
||||
);
|
||||
}
|
||||
printf( '<span class="author vcard highlightlinks"><i class="fa fa-user" aria-hidden="true"></i> <a class="url fn n" href="%2$s" rel="author">%1$s %3$s</a></span>',
|
||||
esc_html_x( 'by ', 'Used before post author name.', 'solarify' ),
|
||||
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
|
||||
get_the_author()
|
||||
); ?>
|
||||
<span>
|
||||
<i class="fa fa-comments" aria-hidden="true"></i>
|
||||
<?php if ( comments_open( get_the_ID() ) ) : ?>
|
||||
<a href="<?php comments_link(); ?>">
|
||||
<?php
|
||||
comments_number( 'no comments', '1 comment', '% comments');
|
||||
?>
|
||||
</a>
|
||||
<?php
|
||||
else:
|
||||
echo esc_html__( ' comments closed', 'solarify' );
|
||||
endif; ?>
|
||||
</span>
|
||||
<?php if ( function_exists( 'mwt_share_this' ) ) {
|
||||
solarify_share_this();
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<div class="header-body">
|
||||
<?php
|
||||
the_title( '<h1 class="entry-title">', '</h1>' );
|
||||
?>
|
||||
<?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) ) : ?>
|
||||
|
||||
<div class="categories-links highlightlinks"><?php echo get_the_category_list( esc_html_x( ' ', 'Used between list items, there is a space after the comma.', 'solarify' ) ); ?></div>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
</header><!-- .entry-header -->
|
||||
<?php
|
||||
the_content();
|
||||
wp_link_pages( array(
|
||||
'before' => '<div class="page-links"><span class="page-links-title">' . esc_html__( 'Pages:', 'solarify' ) . '</span>',
|
||||
'after' => '</div>',
|
||||
'link_before' => '<span>',
|
||||
'link_after' => '</span>',
|
||||
) );
|
||||
?>
|
||||
|
||||
</div><!-- .entry-content -->
|
||||
</article><!-- #post-## -->
|
||||
|
||||
<nav id="image-navigation"
|
||||
class="navigation image-navigation row columns_padding_0 page-nav">
|
||||
<div class="col-md-6">
|
||||
<div class="nav-item with_padding text-center text-md-right cs main_bg_color">
|
||||
<?php previous_image_link( false, '<div class="previous-image small-text">' . esc_html__( 'Previous Image', 'solarify' ) . '</div>' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="nav-item with_padding text-center text-md-left cs main_bg_color3">
|
||||
<?php next_image_link( false, '<div class="next-image small-text">' . esc_html__( 'Next Image', 'solarify' ) . '</div>' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav><!-- #image-navigation -->
|
||||
|
||||
<?php comments_template(); ?>
|
||||
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
</div><!--eof #content -->
|
||||
<?php if ( $column_classes['sidebar_class'] ): ?>
|
||||
<!-- main aside sidebar -->
|
||||
<aside class="<?php echo esc_attr( $column_classes['sidebar_class'] ); ?>">
|
||||
<?php get_sidebar(); ?>
|
||||
</aside>
|
||||
<!-- eof main aside sidebar -->
|
||||
<?php
|
||||
endif;
|
||||
get_footer();
|
||||
Reference in New Issue
Block a user