Site logo

Archived topic

nav-links not displaying in Archive

14 replies · Started by Mohit on September 19, 2018

Viewing posts 1–15 of 15

Hi,

Nav links for archives (numbers below post archive that shows how many posts are there) stopped displaying. They were displaying before but no longer are displaying?

Hi there,

have you added any plugins since that has happened? Can you try disabling any plugins one by one and see if it resolves the issue

Hi,

No I didn't added any plugin.

Have you added any functions to a child theme or GP Hooks?

i wouldn't expect that to effect the nav, it shouldn't, but can you remove the hook and see if it makes any difference.

I disabled the hook but no luck

How many posts per page do you have set in "Settings > Reading"? It looks like you only have 7 posts?

Hi Tom,

I have more than 200 posts but can’t see the nav link neither in homepage nor in archive!

Aha, so instead of this:

add_filter( 'generate_show_post_navigation', '__return_false' );

Do this:

add_action( 'wp', function() {
    if ( is_single() ) {
        add_filter( 'generate_show_post_navigation', '__return_false' );
    }
} );

Hey,

It didn't hide the post navigation! Instead, I am getting two post navigations.
See it here: https://prnt.sc/kwilty

Try replacing after_setup_theme with wp.

It worked,

Thanks

You're welcome :)

This archived topic is closed to new replies.