0

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 1

0

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.

1
  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.