调取当日文章
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 <…
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<?php
$today = getdate();
$args = array(
‘date_query’ => array(
array(
‘year’ => $today[‘year’],
‘month’ => $today[‘mon’],
‘day’ => $today[‘mday’],
),
),
);
$custom_query = new WP_Query( $args );
?>
<?php if ($custom_query->have_posts()) : while ($custom_query->have_posts()) : $custom_query->the_post(); ?>
<?php get_template_part( ‘content’, get_post_format() ); ?>
<?php endwhile; endif; // end of custom loop ?>
<?php wp_reset_postdata(); ?>
|
类别:WordPress开发、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。
评论功能已经关闭!