Home › Forums › Winning Agent Pro Theme › Remove Primary Nav from Homepage but keep it on other pages › Reply To: Remove Primary Nav from Homepage but keep it on other pages
April 7, 2014 at 9:01 am #2765
Member
Hi Dan,
You could add a conditional statement. Something along the lines of:
// Remove nav from regular location
remove_action( 'genesis_after_header', 'genesis_do_nav' );
// Add custom nav function instaed
add_action( 'genesis_after_header', 'my_selective_nav' );
function my_selective_nav() {
// if we're not on the front page, display the nav
if ( ! is_front_page() ) {
genesis_do_nav();
}
}
Note that code is UNTESTED and could blow up your functions file. But that’s the general idea of how you’d go about it.
Cheers,
Carrie