我想顯示在WordPress上了年紀後第一:顯示較早的帖子第一
我使用此代碼來獲取當前類職位的名單:
<ul id="submenu_productos" class="clearfix">
<?php
$IDOutsideLoop = $post->ID;
while(have_posts()) {
the_post();
foreach((get_the_category()) as $category)
$my_query = new WP_Query('category_name=' . $category->category_nicename . '&orderby=date&order=desc&showposts=100');
if($my_query) {
while ($my_query->have_posts()) {
$my_query->the_post(); ?>
<li<?php print (is_single() && $IDOutsideLoop == $post->ID) ? ' class="test"' : ''; ?>>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a> |
</li>
<?php
}
}
}
?>
</ul>
如果我將"&order=desc&"
更改爲"&order=ASC&"
它仍然以相同的方式排列順序。我在這裏做錯了什麼?
您不應該在日期而不是標題? – CustomX
我也改變了。仍然顯示相同的 –
「&orderby = date&order = asc」 –