Forums

[resolved] Page navigation problem with custom query (6 posts)

  1. Sebastien Couture
    Member
    Posted 2 years ago #

    I'm having a problem flipping pages when I make a custom query with query_posts() or WP_Query(). The query get the right posts but navigating from page to page always returns the same posts.

    Any ideas?

    Thanks
    Seb

  2. MichaelH
    Volunteer
    Posted 2 years ago #

    Since you didn't supply any examples, will throw this out for your consideration:

    Example of proper pagination:

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts('cat=1&posts_per_page='.get_option('posts_per_page').'&paged=' . $paged);
    ?>
  3. Sebastien Couture
    Member
    Posted 2 years ago #

    MichaelH, you know everything.

    Thanks

    Seb

  4. MichaelH
    Volunteer
    Posted 2 years ago #

    Thanks, but I know just a few things.

  5. driera
    Member
    Posted 2 years ago #

    I had same problem, I've searched every where, coded tons of lines and wasted a considerated number of hours and this few lines solves it!!

    Thank you

    Daniel

  6. haunted2007
    Member
    Posted 1 year ago #

    Hey guyz Im facing the same problem past 6 months and didn't get a fix for this !!!

    Here is the script that Im using....
    http://flopsite.com/Wordpress%202.9.2.rar

    Demo : http://www.flopsite.com
    ( Click on the ← Previous Entries at the bottom of the page and it will display the main page only :-( )

    I dont know where the exact problem is and in wich file so please help me out people :-(

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.