Disable Next/Previous on Home Page

Community Forums Forums General Discussion Disable Next/Previous on Home Page

This topic is: resolved

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  mtombs 1 year ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #59052

    mtombs
    Participant
    Post count: 3

    I’ve just started using Genesis, and I’ve been experimenting with the sample child theme. I’d like to know if there’s a way to remove the next/previous page navigation link from the home page, but keep it on archive pages?

    Any suggestions would be very welcome.

    I’m trying to get the hang of Genesis on a local installation of WordPress, so I can’t provide a link.

    Thanks,

    Michael

    #59473

    Sridhar Katakam
    Participant
    Post count: 1017

    Add this in child theme’s functions.php:

    remove_action( 'genesis_after_endwhile', 'genesis_posts_nav' );
    add_action( 'genesis_after_endwhile', 'my_genesis_posts_nav' );
    
    function my_genesis_posts_nav() {
    	if (!is_front_page()) {
    		genesis_posts_nav();
    	}
    }

    #59548

    mtombs
    Participant
    Post count: 3

    Dear Sridhar,

    Many thanks for your help. That worked a treat!

    Michael

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Disable Next/Previous on Home Page’ is closed to new replies.