add_theme_support( $feature='menus' )

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

Topic add-theme-support menus Wordpress

Category Web


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():

...

...

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.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.