themes-wordpress/sketch/content.php
2018-02-27 14:24:59 +11:00

42 lines
1.5 KiB
PHP

<?php
/**
* @package Sketch
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php if ( 'link' == get_post_format() ) : ?>
<?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( sketch_get_link_url() ) ), '</a></h1>' ); ?>
<?php else : ?>
<?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?>
<?php endif; ?>
</header><!-- .entry-header -->
<?php if ( has_post_thumbnail() ) : ?>
<div class="entry-thumbnail">
<?php the_post_thumbnail( 'sketch-featured' ); ?>
</div>
<?php endif; ?>
<?php if ( 'post' == get_post_type() ) : ?>
<div class="entry-meta">
<?php sketch_post_format(); ?>
<?php sketch_posted_on(); ?>
<?php edit_post_link( __( 'Edit', 'sketch' ), '<span class="sep"> | </span><span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-meta -->
<?php endif; ?>
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'sketch' ) ); ?>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'sketch' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<?php endif; ?>
</article><!-- #post-## -->