开发者 |
McGuive7
MIGHTYminnow Braad jgonzo127 |
---|---|
更新时间 | 2021年5月11日 00:11 |
捐献地址: | 去捐款 |
PHP版本: | 5.3 及以上 |
WordPress版本: | 5.7.1 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
amfp_auto_sync_menu
filter and set it to true, like so:
add_filter( 'amfp_auto_sync_menu', '__return_true' );
The menu takes your hierarchy of pages and creates a nav menu item for each page. Every time you make a change to the pages on your site, simply click the Sync Auto Menu link in the admin bar to update your menu. Alternately, you can use the provided amfp_auto_sync_menu
filter (just return true) to turn on auto-syncing, however this can create significant overhead.
Yes. When editing a page, look for the "Auto Menu From Pages" metabox, and simply check the box for "Hide from the auto menu".
You'll notice that the auto menu doesn't have the same editing abilities (manually adding a menu item, drag-and-drop sorting of menu items, etc) as other menus. That's because the menu automatically updates to match your page hierarchy, so any manual edits you made to the menu would only be overwritten the next time you edited your pages.
At present, no. The menu auto generates based on your page hierarchy, and therefore isn't able to allow for manually added nav menu items.
amfp_auto_sync_menu
filter to turn it on for development.