-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnews-content.php
More file actions
36 lines (31 loc) · 949 Bytes
/
news-content.php
File metadata and controls
36 lines (31 loc) · 949 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/**
* The template for displaying news content
*
* @package WordPress
* @subpackage BirdFILED
* @since BirdFILED 1.0
*/
?>
<section id="news">
<div class="container">
<h2><?php _e( 'NEWS', 'birdfield' ) ?></h2>
<ul class="article">
<?php
$birdfield_news_posts = birdfield_get_news_posts();
foreach ( (array) $birdfield_news_posts as $order => $post ) :
setup_postdata( $post ); ?>
<li id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'birdfield' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">
<header class="entry-header">
<time class="postdate" datetime="<?php echo get_the_time('Y-m-d') ?>"><?php echo get_post_time( get_option( 'date_format' ) ); ?></time>
<h2 class="entry-title"><?php the_title(); ?></h2>
</header>
</a>
</li>
<?php endforeach;
wp_reset_postdata();
?>
</ul>
</div>
</section>