I want to ask why after I deleted the add_theme_support($feature='menus') in my functions.php there is still menus in my theme activated. why it is still there even if I did not write the add_theme_support for menu. Can anyone explain it? thanks and best regards
1 Answer
From the documentation for add_theme_support()
:
The following parameters are read only, and should only be used in the context of current_theme_supports():
...
menus
: Use register_nav_menu() or register_nav_menus() instead....
So your theme shouldn't be using add_theme_support($feature='menus')
to begin with. Support is automatically added by register_nav_menu()
. If you don't want menu options for your theme, make sure you're not using register_nav_menu()
anywhere.
-
Thanks. I accidentally fix the problem and that was I not activating my custom theme that is why the code does not effect. Thank you for answering my question. Sep 5, 2019 at 6:45