WordPress.org

Forums

[closed] Pagination problem (6 posts)

  1. mirceacnu
    Member
    Posted 5 years ago #

    Hey, I installed a pagination pplugin (wp-pagenavi) and now I'm having some problems
    http://site.com/page/2 still has the posts from my home and same happens for page/111!
    Anyone has any idea what might be the issue?

  2. stvwlf
    Member
    Posted 5 years ago #

    yes - are you using a query_posts() on the page you are having a problem on? If so you must use this code

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("cat=$cat&paged=$paged");

    Insert your query_posts parameters in the query_posts line, replacing cat=$cat with yours, and adding in the paged=$paged. This resolves pagination issues.

  3. Shane G
    Member
    Posted 5 years ago #

  4. mirceacnu
    Member
    Posted 5 years ago #

    I discovered it's not the plugin's fault...I have the same content on every page period. What could be the issue here?
    page 2, page 3, page 333 have the same content as the homepage :|

  5. mirceacnu
    Member
    Posted 5 years ago #

    The thing is I removed a category from the main page and the code is messing all my blog like this.

    I copy/pasted exactly from the codex page

    <?php
    if (is_home()) {
    query_posts("cat=-5229");
    }
    ?>

    What can I do?

  6. MichaelH
    Member
    Posted 5 years ago #

    Same question here so will close this thread:
    http://wordpress.org/support/topic/317392

Topic Closed

This topic has been closed to new replies.

About this Topic