每页应显示5篇文章(一页上所有文章显示1篇),忽略帖子ID的$value1和$value2。确保$value1和$value2是整数。
$args = array(
    \'numberposts\' => 5,
    \'posts_per_page\' => get_option(\'posts_per_page\'),
    \'paged\' => $paged,
    \'post__not_in\' => array(
        $value1,
        $value2
    )
);
query_posts($args);
 编辑-根据下面的进一步信息,并根据该站点的代码,尝试以下操作-
回路1-
<?php
query_posts(\'showposts=8\');
$ids = array();
while(have_posts()) : the_post();
    $ids[] = get_the_ID();
    the_title();
    the_content();
endwhile;
?>
 回路2-
<?php
query_posts(array(\'post__not_in\' => $ids));
while(have_posts()) : the_post();
    $ids[] = get_the_ID();
    the_title();
    the_content();
endwhile;
?>
 回路3-
<?php
query_posts(array(\'post__not_in\' => $ids));
while(have_posts()) : the_post();
    the_title();
    the_content();
endwhile;
?>
 重要注意事项-确保不重新声明
$ids 循环2或3中的数组,因为这将覆盖以前的数组并创建一个新的空白数组。此外,确保将第二个循环中的ID添加到
$ids 所以循环3知道要排除什么。