Forums
Home / Theme: GeneratePress / how to disable this in theme primary-menu
(@leonitmt)
4 months ago
Hello, how to disable this in theme <div id=”primary-menu” class=”main-nav”> to remove it in theme with all this <ul class=”menu sf-menu”>
(@diggeddy)
Hi there,
are you wanting to remove the entire Primary Navigation from the site ?
yes but the two that I sent the primary-menu and the menu sf-menu, I will remove
(@leohsiang)
To remove the primary navigation, select No Navigation in Customizer > Layout > Primary Navigation: https://docs.generatepress.com/article/navigation-location/
Hello, can i remove only the ones I mentioned, not all of them, no navigation, but only those two
Sorry but I’m not really sure what you are trying to achieve here.
Can you provide more details?
but these two that I have sent to remove <div id=”primary-menu” class=”main-nav”> and the <ul class=”menu sf-menu”>
You can’t remove the 2 x HTML Elements you have listed. They are both required for the navigation and menu to work .
I can’t remove this main-nav menu with all the sf-menu without making it no navigation?
That is correct.
Okay, how to enable this nav-search-enabled , can php code be used to enable it
The Navigation Search feature can be disabled in the customizer as well: https://docs.generatepress.com/article/navigation-search/
How to activate, I’m talking about nav-search-enabled
I’m not sure what you are asking here.
The search option can be activated or deactivated in the customizer under Layout > Primary Navigation.
Yes I know this but it is not showing that it is nav-search-enabled
(@yingscarlett)
This class is only added if the legacy navigation search is enabled. However, it was a legacy feature, GP uses the new navigation search modal now.