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

WP SITES

2671

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Tutorial Requests
  • Contact
  • Videos
  • Tags
  • Log in

Premium Member? - Request custom code

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

Brad Dalton Specializes In Genesis child theme customization & code modification. Read More…

Learn PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems