forked from AndorChen/V2Press
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage-recent.php
33 lines (29 loc) · 982 Bytes
/
page-recent.php
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
<?php
/**
* Template Name: Recent Topics
*
* This page template is only used for Recent page.
*
* @since 0.0.1
*/
get_header();
?>
<div id="main">
<section id="recent-topics-box" class="box">
<div class="heading">
<p class="xsmall fade"><?php vp_breadcrumb(); ?></p>
</div>
<?php // Recent 50 topics order by create date ?>
<div id="recent-topics" class="topics-list">
<?php $recent = new WP_Query( 'posts_per_page=50' ); ?>
<?php if ( $recent->have_posts() ) : while ( $recent->have_posts() ) : $recent->the_post(); ?>
<?php get_template_part( 'content', 'topics-list' ); ?>
<?php endwhile; ?>
<?php else : ?>
<?php get_template_part( 'content', 'zero' ); ?>
<?php endif; // END if have_posts() ?>
</div>
</section>
</div><!--END #main-->
<?php get_sidebar(); ?>
<?php get_footer(); ?>