• I am using this code to perform a query on my DB so that I can show only the posts from “category 7″…
    <?php
    $page = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : ‘1’;
    query_posts(‘cat=7&paged=$page’);
    ?>
    I am using the first bit so that my page navigation (previous and next posts links) will work (apparently). It does not seem to be working though :(. When I click on the link for “previous posts” I get a 404 error.

    What am I doing wrong? I have tried deleting and re-creating my htaccess file. It seems that others have had success with this but I cannot seem to get it to work.

    Any Ideas?

  • The topic ‘pagination with custom query’ is closed to new replies.