WordPress.org

Ready to get started?Download WordPress

Forums

WP-PageNavi
[resolved] stop loading pagination beyond a certain number (2 posts)

  1. Kalyan Brata Das
    Member
    Posted 2 months ago #

    Hi,

    I am just loving this wonderful plugin. Is there a way to make it stop showing/loading pages beyond a certain number of pages?

    Currently, I have set it 12 pages to show on one of my blogs and I do not wish to load/show other pages like (14,15,16,last..etc) even though there are more than 12 pages.

    any help will be highly appreciative.

    https://wordpress.org/plugins/wp-pagenavi/

  2. Lester Chan
    Member
    Plugin Author

    Posted 2 months ago #

    Sorry I am afraid that feature doesn't exist in the plugin. You can probably do this but it is an ugly hack that you can add to the top of your theme.

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    if($paged > 12 ) {
    die();
    }
    ?>

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.