WordPress.org

Forums

WP-PageNavi
[resolved] How to disable pagenavi from some page? (2 posts)

  1. malefactor
    Member
    Posted 4 years ago #

    How can I disable wp_pagenavi function from some page, (front page) in my case?
    I've tried something like that:

    <?php
    if ($_SERVER['PHP_SELF'] == '/index.php') {
    }
    else {
    wp_pagenavi();
    } ?>

    but whiteout success. This code disable pagenavi from all page.

  2. malefactor
    Member
    Posted 4 years ago #

    Finally I found solution. Here is the code if someone 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