• Resolved Sebastien Couture

    (@scouture)


    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

Viewing 5 replies - 1 through 5 (of 5 total)
  • MichaelH

    (@michaelh)

    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);
    ?>

    Thread Starter Sebastien Couture

    (@scouture)

    MichaelH, you know everything.

    Thanks

    Seb

    MichaelH

    (@michaelh)

    Thanks, but I know just a few things.

    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

    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….
    https://flopsite.com/Wordpress%202.9.2.rar

    Demo : https://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 ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Page navigation problem with custom query’ is closed to new replies.