mardi 31 mars 2015

Genesis - Turn off menu on certain pages

I want to turn off a the menu on certain pages in a genesis framework for WP. I have the following code:



function turn_off_menu() {
if (!is_front_page() || !is_page('blog')) {
remove_action( 'genesis_after_header','genesis_do_nav' ) ;
}
}

add_action( 'init', 'turn_off_menu');


But this is turning off the menu on every page.


Aucun commentaire:

Enregistrer un commentaire