Remove Primary Menu from specific pages in GenesisUpdated On May 23, 2015 June 22, 2014 -Written By
Just like other elements / sections, we can also remove Primary Navigation menu from specific pages or posts as per requirement. For example while creating corporate type of website using Genesis theme, you may not want to show primary menu on specific pages.
Code to remove Primary Menu from specific pages in Genesis
Paste following code in functions.php file to remove primary menu from displaying on those specific pages.
In the code, 61 and 181 are IDs of pages we want to hide. Replace them with ID of pages on your website. You can also add more pages in this list.
Removing Primary Menu from only homepage in Genesis
Based on the above code, we can hide Primary menu from only homepage and show it on the rest pages / posts. Paste following code in functions.php file.
As such, you can play around with code to hide Primary and Secondary menu on any post, page, homepage of your Genesis theme website.
I used the above code and it works perfectly. Thank you!
I need help with using the above code but with a range of pages. I have about 60 pages I want to hide the primary menu. The page IDs range from 1004 to 1176.
Instead of entering each ID separately, how do I enter a range.