taxonomy-post_format.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /**
  3. * The template for displaying Post Format pages
  4. *
  5. * Used to display archive-type pages for posts with a post format.
  6. * If you'd like to further customize these Post Format views, you may create a
  7. * new template file for each specific one.
  8. *
  9. * @todo http://core.trac.wordpress.org/ticket/23257: Add plural versions of Post Format strings
  10. * and remove plurals below.
  11. *
  12. * @link http://codex.wordpress.org/Template_Hierarchy
  13. *
  14. * @package WordPress
  15. * @subpackage Twenty_Fourteen
  16. * @since Twenty Fourteen 1.0
  17. */
  18. get_header(); ?>
  19. <section id="primary" class="content-area">
  20. <div id="content" class="site-content" role="main">
  21. <?php if ( have_posts() ) : ?>
  22. <header class="archive-header">
  23. <h1 class="archive-title">
  24. <?php
  25. _e( 'Archives', 'twentyfourteen' );
  26. ?>
  27. </h1>
  28. </header><!-- .archive-header -->
  29. <?php
  30. // Start the Loop.
  31. while ( have_posts() ) : the_post();
  32. /*
  33. * Include the post format-specific template for the content. If you want to
  34. * use this in a child theme, then include a file called called content-___.php
  35. * (where ___ is the post format) and that will be used instead.
  36. */
  37. get_template_part( 'content', get_post_format() );
  38. endwhile;
  39. // Previous/next page navigation.
  40. if (function_exists("pagination")) : pagination(); endif;
  41. else :
  42. // If no content, include the "No posts found" template.
  43. get_template_part( 'content', 'none' );
  44. endif;
  45. ?>
  46. </div><!-- #content -->
  47. </section><!-- #primary -->
  48. <?php
  49. get_sidebar( 'content' );
  50. get_sidebar();
  51. get_footer();