Site logo

Archived topic

Page navigation above AND below content?

3 replies · Started by Todd on January 28, 2019

Viewing posts 1–4 of 4

Is there a way to have page navigation both above and below content? I'm using WP-pagenavi, but I'm guessing the path to achieve this is the same for both the default and wp-pagenavi.

A side question, that might not be in your wheelhouse (I've asked over at wp-pagenavi too), but I'll ask in case it's an easy answer (if it's not, feel free to ignore). Is there a way to make all of the page navigation links (in my case First, Prev, Next, Last) be visible at all times, instead of having the links disappear when there isn't a previous / next page. I get why the logic is setup this way, but I'm wanting the formatting to stay consistent. Optimally, the links would just become text when they aren't clickable.

Thanks for all your help to this point! :)

login: tom/generate

Hey Todd,

If WP PageNavi allows multiple instances, you can do this:

add_action( 'generate_before_main_content', function() {
    if ( function_exists( 'wp_pagenavi' ) ) {
        wp_pagenavi();
    }
} );

I'm not sure about the second question, unfortunately. It should be something their developers have an answer to though :)

Oh wow, thanks, that worked perfectly! I had no idea it was that simple. I was digging into various php files to see if I could add it directly. Glad I never figured out my messy solution!

Hooks are awesome! Glad I could help :)

This archived topic is closed to new replies.