content.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * @package Sketch
  4. */
  5. ?>
  6. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  7. <header class="entry-header">
  8. <?php if ( 'link' == get_post_format() ) : ?>
  9. <?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( sketch_get_link_url() ) ), '</a></h1>' ); ?>
  10. <?php else : ?>
  11. <?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?>
  12. <?php endif; ?>
  13. </header><!-- .entry-header -->
  14. <?php if ( has_post_thumbnail() ) : ?>
  15. <div class="entry-thumbnail">
  16. <?php the_post_thumbnail( 'sketch-featured' ); ?>
  17. </div>
  18. <?php endif; ?>
  19. <?php if ( 'post' == get_post_type() ) : ?>
  20. <div class="entry-meta">
  21. <?php sketch_post_format(); ?>
  22. <?php sketch_posted_on(); ?>
  23. <?php edit_post_link( __( 'Edit', 'sketch' ), '<span class="sep"> | </span><span class="edit-link">', '</span>' ); ?>
  24. </div><!-- .entry-meta -->
  25. <?php endif; ?>
  26. <?php if ( is_search() ) : // Only display Excerpts for Search ?>
  27. <div class="entry-summary">
  28. <?php the_excerpt(); ?>
  29. </div><!-- .entry-summary -->
  30. <?php else : ?>
  31. <div class="entry-content">
  32. <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'sketch' ) ); ?>
  33. <?php
  34. wp_link_pages( array(
  35. 'before' => '<div class="page-links">' . __( 'Pages:', 'sketch' ),
  36. 'after' => '</div>',
  37. ) );
  38. ?>
  39. </div><!-- .entry-content -->
  40. <?php endif; ?>
  41. </article><!-- #post-## -->