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 featured content |
|
4 |
* |
|
5 |
* @package WordPress |
|
6 |
* @subpackage Twenty_Fourteen |
|
7 |
* @since Twenty Fourteen 1.0 |
|
8 |
*/ |
|
9 |
?> |
|
10 |
||
11 |
<div id="featured-content" class="featured-content"> |
|
12 |
<div class="featured-content-inner"> |
|
13 |
<?php |
|
14 |
/** |
|
15 |
* Fires before the Twenty Fourteen featured content. |
|
16 |
* |
|
17 |
* @since Twenty Fourteen 1.0 |
|
18 |
*/ |
|
19 |
do_action( 'twentyfourteen_featured_posts_before' ); |
|
20 |
||
21 |
$featured_posts = twentyfourteen_get_featured_posts(); |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
22 |
foreach ( (array) $featured_posts as $order => $post ) : |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
23 |
setup_postdata( $post ); |
5 | 24 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
25 |
// Include the featured content template. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
26 |
get_template_part( 'content', 'featured-post' ); |
5 | 27 |
endforeach; |
28 |
||
29 |
/** |
|
30 |
* Fires after the Twenty Fourteen featured content. |
|
31 |
* |
|
32 |
* @since Twenty Fourteen 1.0 |
|
33 |
*/ |
|
34 |
do_action( 'twentyfourteen_featured_posts_after' ); |
|
35 |
||
36 |
wp_reset_postdata(); |
|
37 |
?> |
|
38 |
</div><!-- .featured-content-inner --> |
|
39 |
</div><!-- #featured-content .featured-content --> |