WordPress.org

Ready to get started?Download WordPress

Forums

pagination with custom query (1 post)

  1. altacivil
    Member
    Posted 8 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic