WordPress.org

Ready to get started?Download WordPress

Forums

WP-PageNavi
disable wp-pagenavi on pages with template using the loop (3 posts)

  1. shinnok
    Member
    Posted 3 years ago #

    How can i disable wp-pagenavi on pages using templates and the wordpress loop? It seems that wp-pagenavi adds itself automatically wherever the
    wordpress loop is used, not counting that it is a page or not.

  2. malefactor
    Member
    Posted 3 years ago #

    Hey buddy, did you figure it out how to disable wp-pagenavi? I am wondering how to as well.
    I'm using loop on my front page (index.php) and don't need pagenavi there.

  3. malefactor
    Member
    Posted 3 years ago #

    Finally I found solution. Here is the code if you still need it.

    <?php
    $delnavi="http://" . $_SERVER['HTTP_HOST']  . $_SERVER['REQUEST_URI'];
    if ($delnavi=="http://your_web_site_here.com/") {
    }
    else {
    wp_pagenavi();
    } ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic