Automatically generate a navigation menu from your page hierarchy.
Auto Menu From Pages generates a WordPress navigation menu that matches your page order and hierarchy. Simply click the Sync Auto Menu link in the admin bar to update the auto menu and reflect any changes you make to your pages so it is always current.
The auto menu works just like any other WordPress navigation menu, meaning that you can assign it to any of your theme’s menu locations, output it using the Custom Menu widget, and do anything else that you could normally do to a navigation menu.
This plugin has the ability to automatically sync your menu after pages are modified, however the feature is turned off by default as it can create significant overhead. To turn it on, use the provided
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_menufilter to turn it on for development.