]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-content/themes/twentyfourteen/taxonomy-post_format.php
WordPress 4.4
[autoinstalls/wordpress.git] / wp-content / themes / twentyfourteen / taxonomy-post_format.php
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 https://core.trac.wordpress.org/ticket/23257: Add plural versions of Post Format strings
10  * and remove plurals below.
11  *
12  * @link https://codex.wordpress.org/Template_Hierarchy
13  *
14  * @package WordPress
15  * @subpackage Twenty_Fourteen
16  * @since Twenty Fourteen 1.0
17  */
18
19 get_header(); ?>
20
21         <section id="primary" class="content-area">
22                 <div id="content" class="site-content" role="main">
23
24                         <?php if ( have_posts() ) : ?>
25
26                         <header class="archive-header">
27                                 <h1 class="archive-title">
28                                         <?php
29                                                 if ( is_tax( 'post_format', 'post-format-aside' ) ) :
30                                                         _e( 'Asides', 'twentyfourteen' );
31
32                                                 elseif ( is_tax( 'post_format', 'post-format-image' ) ) :
33                                                         _e( 'Images', 'twentyfourteen' );
34
35                                                 elseif ( is_tax( 'post_format', 'post-format-video' ) ) :
36                                                         _e( 'Videos', 'twentyfourteen' );
37
38                                                 elseif ( is_tax( 'post_format', 'post-format-audio' ) ) :
39                                                         _e( 'Audio', 'twentyfourteen' );
40
41                                                 elseif ( is_tax( 'post_format', 'post-format-quote' ) ) :
42                                                         _e( 'Quotes', 'twentyfourteen' );
43
44                                                 elseif ( is_tax( 'post_format', 'post-format-link' ) ) :
45                                                         _e( 'Links', 'twentyfourteen' );
46
47                                                 elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) :
48                                                         _e( 'Galleries', 'twentyfourteen' );
49
50                                                 else :
51                                                         _e( 'Archives', 'twentyfourteen' );
52
53                                                 endif;
54                                         ?>
55                                 </h1>
56                         </header><!-- .archive-header -->
57
58                         <?php
59                                         // Start the Loop.
60                                         while ( have_posts() ) : the_post();
61
62                                                 /*
63                                                  * Include the post format-specific template for the content. If you want to
64                                                  * use this in a child theme, then include a file called called content-___.php
65                                                  * (where ___ is the post format) and that will be used instead.
66                                                  */
67                                                 get_template_part( 'content', get_post_format() );
68
69                                         endwhile;
70                                         // Previous/next page navigation.
71                                         twentyfourteen_paging_nav();
72
73                                 else :
74                                         // If no content, include the "No posts found" template.
75                                         get_template_part( 'content', 'none' );
76
77                                 endif;
78                         ?>
79                 </div><!-- #content -->
80         </section><!-- #primary -->
81
82 <?php
83 get_sidebar( 'content' );
84 get_sidebar();
85 get_footer();