最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

add theme support - add_theme_support( $feature='menus' )

programmeradmin1浏览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

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

Share Improve this question asked Sep 5, 2019 at 2:18 Lucifer LeviLucifer Levi 932 silver badges11 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 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():

...

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

发布评论

评论列表(0)

  1. 暂无评论