WordPress.org

Ready to get started?Download WordPress

Forums

WP-PageNavi
[wp-pagenavi] does not work (8 posts)

  1. ZuiderZeiler
    Member
    Posted 3 years ago #

    I have upgraded to WP 3.2 today, and the plugin [WP-Pagenavi] does not seem to be working anymore.
    I have tried clearing all cache's (w3 total cache, browser) ect, setting my blog to show just two posts per page, but to no avail. If there is a solution, please let me know.

    My blog: http://www.zeilbootglimlach.nl (Its in Dutch though).

  2. felipedario
    Member
    Posted 2 years ago #

    Same problem with me.

  3. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    It would be helpful if you could describe how exactly it "doesn't work".

  4. felipedario
    Member
    Posted 2 years ago #

    The <?php wp_pagenavi(); ?> is on my template file, the plugin is active and the settings are default, but nothing appears in the page or in the source code, as if the <?php wp_pagenavi(); ?> wasn't there, or there was only one page of content (which isn't the case).

    There's also no error message, like if the plugin wasn't active.

  5. brian914
    Member
    Posted 2 years ago #

    I have the exact same issue. Did you figure it out? Go to a different plugin? If so, would be curious to which one.

    Thanks!

  6. ZuiderZeiler
    Member
    Posted 2 years ago #

    SOLVED for me:
    I have not previously had to edit my PHP files to make this plugin work. However the installation instructions of this plugin read:

    Usage

    In your theme, you need to find calls to next_posts_link() and previous_posts_link() and replace them.

    In the Twentyten theme, it looks like this:

    <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div>
    <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div>

    You would replace those two lines with this:

    <?php wp_pagenavi(); ?>

    Go to WP-Admin -> Settings -> PageNavi for configuration.

    I use the theme andrea personally, which contains a number of php files (index, posts, single, search ect) containing such calls.
    Replacing this entire block with "<?php wp_pagenavi(); ?>" sorted the problem. Oddly enough, just commenting the block like

    /*
    <div class="navigation group">
    <div class="alignleft"><?php next_posts_link('« Older Entries'); ?></div>
    <div class="alignright"><?php previous_posts_link('Newer Entries »'); ?></div>
    </div>
    */

    resulted in the comment marks showing up as text and the old style menu still being visible. Also putting the new line inside the "navigation group" block does NOT work. You have to replace it.
    Apparently any comments in the php file index.php get put on the webpage as plain text. (Maybe because its inside a div block ?)

  7. brian914
    Member
    Posted 2 years ago #

    ZuiderZeiler, thank you. I started with a blank them, so I don't have those tags. I think I have everything in place, just that tag does not seem to do anything for me.

    Thank you for taking the time to explain your solution.

  8. chickwithbob
    Member
    Posted 2 years ago #

    In case anybody is looking for a solution as to why pagenavi might suddenly stop working after a WordPress upgrade:

    The wp page navi suddenly broke for me when I upgraded a site from 2.9.2 to WordPress 3.2.1

    After looking through the code, I found the problem actually lay with the pagenavi settings within the admin - The upgrade wiped my pagenavi settings and made them all blank, hence why the nav was no longer appearing at all.

    Resetting these blank entries to values fixed it for me.
    Now working perfectly :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic