• Hey everyone,

    I have what I thought was a simple request. I need to exclude an author from the posts page. I know this seems weird, but this particular author I use to upload video content, and I don’t want that content on my posts page. So far, I’ve tried to use query_posts() to make it work. Before the loop, I put:

    <?php query_posts('author=-4'); ?>

    This successfully removed the said author from my posts page. However, when I go to the bottom and click “Older entries”, it doesn’t do the paging correctly. It just gives me the same list as on the first page. I’m assuming that the page number needs to be fed into query_posts(), but I’m not sure how to do that. Any ideas?

    Thanks,
    vital101

Viewing 1 replies (of 1 total)
  • Might try something like:

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts('author=-4&paged='.$paged);
    ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Use query_posts() to exclude an author’ is closed to new replies.