Ready to get started?Download WordPress


Problem with Query_posts and filtering (2 posts)

  1. docarzt
    Posted 5 years ago #

    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 http://www.tvovermind.com/page/6) I'm getting the same entries on each page. Where am I going wrong?

  2. docarzt
    Posted 5 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic