Forums

Not display wp-page navi if only one page (2 posts)

  1. Pierrick
    Member
    Posted 4 months ago #

    Hello,

    Does anyone how to prevent the wp-page navi pagination (numbers 1 2 3 ...) when there is only one page?

    This is the call function

    <?php if (function_exists('wp_pagenavi')) { wp_pagenavi();
    } else {
    previous_posts_link(__('Prev'));
    next_posts_link(__('Next'));
    }
    ?>

    but maybe the edit has to be done into the actual plugin files??

    Thanks

    P

  2. Pierrick
    Member
    Posted 4 months ago #

    Hello again,

    Forget about the issue above as this is not an issue anymore, the issue is slightly different now - I am using this function below on the homepage(index.php), and it works perfectly, ie when no newer posts, the "newer posts" greys out and when no older posts, the "older posts" greys out

    Now on the categories page it behaves like this -
    the "newer posts" does not appear at all on page 1 but does on subsequent pages

    And on the tags page it behaves like this -
    the "newer posts" does not appear at all on page 1 and the "older posts" only appears when on page 2 and beyond

    Any help would be much appreciated!
    Cheers
    P

    [Code moderated as per the Forum Rules. Please use the pastebin]

Reply

You must log in to post.

About this Topic