content.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * The default template for displaying content
  4. *
  5. * Used for both single and index/archive/search.
  6. *
  7. * @package WordPress
  8. * @subpackage Twenty_Fourteen
  9. * @since Twenty Fourteen 1.0
  10. */
  11. ?>
  12. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  13. <header class="entry-header">
  14. <?php
  15. if ( is_single() ) :
  16. the_title( '<h1 class="entry-title">', '</h1>' );
  17. else :
  18. the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
  19. endif;
  20. ?>
  21. <div class="entry-meta">
  22. <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
  23. </div><!-- .entry-meta -->
  24. </header><!-- .entry-header -->
  25. <?php if ( is_search() ) : ?>
  26. <div class="entry-summary">
  27. <?php the_excerpt(); ?>
  28. </div><!-- .entry-summary -->
  29. <?php else : ?>
  30. <div class="entry-content">
  31. <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) ); ?>
  32. </div><!-- .entry-content -->
  33. <?php endif; ?>
  34. </article><!-- #post-## -->