• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

Remove Primary Nav Menu From Front Page Of Any StudioPress Theme

Generally, you primary navigation will be hooked into the after header position.

To remove your primary nav menu from the front page of your site only, use this code:

Please copy ALL the code & paste it at the end of your child themes functions.php file using a text editor like Notepad++

Remove Primary Menu After Header

add_action('template_redirect', 'remove_primary_nav_front_page');
function remove_primary_nav_front_page() {
if ( is_front_page() ) }
    remove_action('genesis_after_header', 'genesis_do_nav');
}
    }

If you primary nav menu is displayed in the before header position, use this code.

Remove Primary Menu Before Header

add_action('template_redirect', 'remove_primary_nav_front_page');
function remove_primary_nav_front_page() {
if ( is_front_page() ) }
    remove_action('genesis_before_header', 'genesis_do_nav');
} 
   }

Remove Nav Menu From Other Pages Conditionally

  • Conditionally Remove Your Primary & Secondary Nav Menu
  • Remove Navigation Menu From Specific Page

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags