Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 wordpress 循环中,如何防止我的 2 个帖子出现,即排除:
<?php while ( have_posts() ) : the_post(); ?>
可能吗?
谢谢!
尝试这个:
query_posts(array('post__not_in' => array(1,2))); if ( have_posts() ) : while ( have_posts() ) : the_post();
其中 1 和 2 是您要排除的帖子。