author | ymh <ymh.work@gmail.com> |
Mon, 14 Oct 2019 17:39:30 +0200 | |
changeset 7 | cf61fcea0001 |
parent 5 | 5e2f62d02dcd |
permissions | -rw-r--r-- |
5 | 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 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
29 |
if ( is_tax( 'post_format', 'post-format-aside' ) ) : |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
30 |
_e( 'Asides', 'twentyfourteen' ); |
5 | 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. |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
60 |
while ( have_posts() ) : |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
61 |
the_post(); |
5 | 62 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
63 |
/* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
64 |
* Include the post format-specific template for the content. If you want to |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
65 |
* use this in a child theme, then include a file called content-___.php |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
66 |
* (where ___ is the post format) and that will be used instead. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
67 |
*/ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
68 |
get_template_part( 'content', get_post_format() ); |
5 | 69 |
|
70 |
endwhile; |
|
71 |
// Previous/next page navigation. |
|
72 |
twentyfourteen_paging_nav(); |
|
73 |
||
74 |
else : |
|
75 |
// If no content, include the "No posts found" template. |
|
76 |
get_template_part( 'content', 'none' ); |
|
77 |
||
78 |
endif; |
|
79 |
?> |
|
80 |
</div><!-- #content --> |
|
81 |
</section><!-- #primary --> |
|
82 |
||
83 |
<?php |
|
84 |
get_sidebar( 'content' ); |
|
85 |
get_sidebar(); |
|
86 |
get_footer(); |