高手来下!wordpress 调用时间问题
wordpress吧
全部回复
仅看楼主
level 1
天外左翼 楼主
我用的是这个调用
<ul>
<?php query_posts('cat=1&showposts=5'); //cat是要调用的分类ID,showposts是需要显示的文章数量 ?>
<?php while (have_posts()) : the_post(); ?>
<li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
<?php the_time('Y-m-d'); ?>
</li>
<?php endwhile; wp_reset_query(); ?>
</ul>
如何实现 超过post_date这个时间3小时 不显示该内容,但是还在数据库里!可以有偿。。私信我
2021年03月20日 17点03分 1
level 3
时间那里加个if else,判断服务器时间和文章发布时间,可以试试wp_query
2021年03月20日 20点03分 2
大佬 能详细说下吗?或者留个方式 谢谢
2021年03月21日 12点03分
level 1
天外左翼 楼主
有偿 能帮忙的加我下
2021年03月24日 14点03分 3
1