Support » Fixing WordPress » Problem with Query_posts and filtering

  • I’m trying to exclude some categories and tags from my front page. I used this code to accomplish it:

    <?php
    $args= array(
    ‘category__not_in’ => array(443, 947, 701),
    ‘showposts’=>8,
    ‘tag__not_in’ => array(’21’),
    );
    query_posts($args);
    while (have_posts()) : the_post(); ?>

    However, when I surf to an older page (ie http://www.tvovermind.com/page/6) I’m getting the same entries on each page. Where am I going wrong?

Viewing 1 replies (of 1 total)
  • Okay well I saved this by checking in the head with is_paged() and setting a flag. Later, I check the flag :

    if ($paged == 1) { query_posts($query_string . ‘&showposts=8’); }

    and it seems to work. Is there a cleaner way?

Viewing 1 replies (of 1 total)
  • The topic ‘Problem with Query_posts and filtering’ is closed to new replies.