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:

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

    However, when I surf to an older page (ie 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.