subnav on specific pages?

Community Forums Forums Design Tips and Tricks subnav on specific pages?

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  SoZo 3 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #1197


    I am working on a small site and want the subnav to be displayed on certain pages. I do not want it displayed on the home page.

    Here is the site.

    The subnav is displaying on the proper inner pages, but I can’t seem to get it to not display on the home page. Here is the code I am using.  Please advise.

    /** do not display secondary menu  on chosen pages **/
    add_action(‘template_redirect’, ‘child_conditional_actions’);
    function child_conditional_actions() {
    if ( is_page( array(12,15,2) ) )
    remove_action(‘genesis_after_header’, ‘genesis_do_subnav’);
    /** do not display subnav on home page**/
    if( is_home()  ) { remove_action(‘genesis_after_header’, ‘genesis_do_subnav’);



    Add to your original conditional statement

    if ( is_home || is_page( array(12,15,2) ) )

    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

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

You must be logged in to reply to this topic.