0
我在Wordpress中有一個頁面,僅顯示具有「報紙」類別的帖子。現在,這些帖子按降序排列(我認爲,如果這是默認值),則最新的帖子位於頂部。在Wordpress中使用PHP在頂部顯示帶有「精選」標籤的帖子
這是我的代碼:
<?php $my_query = new WP_Query('category_name=newspaper&posts_per_page=-1'); ?>
<?php if (have_posts()) : while ($my_query->have_posts()) : $my_query->the_post(); ?>
<div class="post">
<!--<h3><?php the_title(); ?></h3>-->
<?php the_content('Read the rest of this entry »'); ?>
<div class="clear"></div>
</div>
<?php endwhile; endif;?>
我在想,如果有可能,以顯示與在頂部有一個「特色」標籤的帖子,而所有其他職位沒有一個特色標籤之後。
謝謝! Amit