[英]Wordpress: category collection with “&orderby=date&order=asc” but order refuses to ascend
下面是一些代码,我想从使用这个话题:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php endwhile; else: endif; ?>
<?php query_posts('category_name='.get_the_title().
'&order=ASC&orderby=date&posts_per_page=10'.'&post_status=publish,future');?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<p><?php the_content(); ?>
<?php endwhile; else: endif; ?>
在文章加载时,使用“ orderby”是否为时已晚? 这就是为什么它固执地保持“最新帖子优先”的原因吗?
请先尝试orderby,然后再订购。
&orderby=date&order=ASC
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.