Forums

Previous Page link not working (7 posts)

  1. James
    Member
    Posted 1 year ago #

    Since I upgraded to 3.0, I can't go back to previous pages on the homepage.
    Here is the query I use:
    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=4&showposts=10&paged=$paged"); ?>

    The problem is, I use the exact same query (different category though) for a different page, and the previous page links work fine.

    Has anyone got a fix for this?

    Thanks

  2. MAS
    Member
    Posted 1 year ago #

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=4&posts_per_page=10&paged=$paged"); ?>

    Try once.

  3. James
    Member
    Posted 1 year ago #

    No luck there

    site is http://www.rub-a-dub-dubbb.com

    If you click on 'Blog' in the main nav bar, the previous pages work fine, and I've used the same code for that. It's just the main page which doesn't work.

  4. MAS
    Member
    Posted 1 year ago #

    $args=array(
       'cat'=>4,
       'caller_get_posts'=>1,
       'posts_per_page'=>10,
       'paged'=>$paged,
       );
    query_posts($args);
  5. James
    Member
    Posted 1 year ago #

    Could you put that into a <?php... tag for me?

    Not really sure where to put it

    Thanks!

  6. MAS
    Member
    Posted 1 year ago #

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args=array(
       'cat'=>4,
       'caller_get_posts'=>1,
       'posts_per_page'=>10,
       'paged'=>$paged,
       );
    query_posts($args);
    ?>
  7. James
    Member
    Posted 1 year ago #

    Still no luck.

    Could this be a bug in 3.0, as it works on other pages, just not the homepage?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags