Back to Community

Troubleshooting WP-PageNavi: Why Your Page Navigation Isn't Showing

35 threads Sep 10, 2025 PluginWp-pagenavi

Content

Why Isn't My Page Navigation Showing Up?

WP-PageNavi is a popular plugin that replaces the standard WordPress pagination with a more advanced, numbered navigation system. A common issue reported by users is that the navigation links fail to appear on their site, leaving only empty <div> tags or the default 'Older posts' links. Based on community reports, this problem can stem from several causes, but the solutions are often straightforward.

Common Causes and Their Solutions

1. The Plugin Code is Missing from Your Theme

Simply installing and activating the plugin is not enough. For it to display, you must add its template tag to your theme files.

  • Solution: Locate the template file where you want the pagination to appear (e.g., index.php, home.php, archive.php, or a custom template). Insert the following code where you want the page navigation to be output:
<?php if( function_exists('wp_pagenavi') ) { wp_pagenavi(); } ?>

This code checks if the plugin is active before trying to call its function, preventing errors.

2. Using a Custom Query Incorrectly

If you are using a custom WP_Query loop (e.g., to display custom post types), the plugin cannot automatically read your custom query variables.

  • Solution: You must explicitly tell WP-PageNavi to use your custom query. Pass the $myquery variable to the function.
<?php 
$myquery = new WP_Query( $args ); 
if ( $myquery->have_posts() ) : 
    while ( $myquery->have_posts() ) : $myquery->the_post();
        // Your loop content
    endwhile;
    // Correct way to call pagenavi with a custom query
    wp_pagenavi( array( 'query' => $myquery ) ); 
endif; 
wp_reset_postdata(); 
?>

3. There Are Not Enough Posts to Paginate

The navigation will only appear if the number of posts exceeds the 'Blog pages show at most' value set in Settings > Reading.

  • Solution: Check your Reading settings and ensure you have created enough posts or pages to require pagination.

    4. CSS Conflicts or Missing Styles

    Sometimes the navigation is outputting to the page but is not visible due to a CSS conflict with your theme.

    • Solution:
      1. Use your browser's inspector tool to check if the <div class="wp-pagenavi"> is present in the page's HTML but is hidden (e.g., with display: none;) or styled in a way that makes it blend into the background.
      2. The WP-PageNavi settings include an option to 'Use pagenavi.css'. Ensure this is checked. You can also try adding the plugin's default CSS to your theme's stylesheet to override any conflicting rules.

    5. The Plugin is Conflicting with Your Theme or Another Plugin

    In some cases, a theme's built-in pagination or another plugin can cause a conflict.

    • Solution: Perform basic conflict testing.
      1. Temporarily switch to a default WordPress theme like Twenty Twenty-One. If the pagination appears, the issue is with your theme's code.
      2. Temporarily deactivate all other plugins. If the pagination appears, reactivate them one-by-one to identify the culprit.

    Need More Help?

    If these steps do not resolve your issue, the problem may be highly specific to your theme's code. For further assistance, it is recommended to seek help from your theme's support channel or the wider WordPress community forums, providing details of the steps you have already tried.

Related Support Threads Support