It’s wise to avoid nav menus in cases like this where things may change frequently. Instead, you could look into using wp_list_pages()
– with a custom walker if you need one to format it visually. Try wp_list_pages()
right out of the box first and see whether you can just use CSS to style the list as desired. If not, then move on to a custom walker, which will also let you adjust the HTML.
Related Posts:
- How to make pages metabox display all hierarchy in menu admin?
- wp_list_pages: only show subpages on the parent page?
- Does loading of sub pages in menu cause load to the server?
- Schedule Page to Menu [duplicate]
- How to retrieve parent menu item name of current submenu item
- How to highlight 1st level menu item based on actual page
- Get parents child pages
- Add CSS Class to WordPress Menu Item Dependent on the Page the User is Visiting
- how to create pages and link them to a menu
- How to sort a sub-menu, generated with get_pages(), by the page order instead of alphabetically?
- Automatically remove trashed pages from nav menu
- Add class to top level menu item if it has multiple child levels
- Simple Navigation Walker – Wrapper-class around first sub-menu
- How to get a separate child menu?
- Exclude one item from wp_list_pages( $args );
- How to drag multiple menu items at once in WordPress?
- Customizing the a tag with Semantic UI
- Put a wp_nav_menu inside another one
- How to get current page menu item name instead of full menu item list
- Generate a Menu that displays all child pages of top level parent
- Hide pages depending on role
- Check if wp_nav_menu items have submenus
- Change menu items URL
- Nav walker, bootstrap: Display 3rd level items under 2nd level
- how to only add a top-level admin menu without it creating a sub-level-menu
- Programmatically adding menu items function replicates in multiple menus
- wp_list_pages sort order is different for different languages [closed]
- list pages only from master parent
- How to have custom menu Item CSS Classes for wp_page_menu() or wp_list_pages()
- WordPress sub-menu items suddenly not showing
- No “current-menu-ancestor” class added when browsing an archive page
- Main Menu and Sub Menu Items for Footer
- How to construct a custom html for submenus
- Check if menu id = $specific_id – then insert specific
- WordPress menu permalink redirects to wrong page
- Link to Homepage in Menu
- add_submenu_page function to show videos table
- How do I add recent posts to the menu?
- How to add ID attribute to each submenu?
- From a page, is it possible to find entry’s “menu_item_parent”?
- Automatically list top level menu item child pages
- Check if menu_item has children or has parent
- Creating a menu containing categories and authors
- category permalinks
- Change submenu markup
- getting the current sub item out of total sub items in a given dropdown (custom walker)
- Does is_child() exist in wp 3.5.1?
- Insert a div class inside wordpress menu
- Add Labels to Admin Menu ( How To )
- How to create a menu item which is not a page
- How can I make a menu link visible only to admins (without plugins)?
- How to add a page to header that is outside of WordPress?
- Problem adding ‘has-children’ class to wp_nav_menu
- How to Structure Pages and Subpages
- Highlighting top level link when viewing one of it’s sub-pages, which are not linked in the menu
- how avoid the link of the current post in the menu in the sidebar?
- Page appears after de registering from menu
- Creating menu always gives error A name is required for this term
- Replace anchor tag with span tag
- If current menu item is child or parent with child?
- Dynamic menu wp_list_pages displaying only current branch including: current page, his siblings and its childs
- wp_list_pages Hierarchical Help
- Parent Page > Child Page Menu
- Add pages content to startpage through custom menu
- An alternative to WordPress’s built-in menu functionality
- Page header menu links change
- Catagorized hierarchy menu for PAGES!
- Is there any way to change the CSS class applied to 2nd level sub menu ul’s?
- Page dependent sub-menu?
- Add Different Class on Different Ul in twenty-twentyone theme
- insert an HTML element if there is a submenu only
- adding pages in underscores.me theme
- How can I creat custom menu with bootstrap
- wp_nav_menu container style args
- How can I click the parent menu then redirect to a special URL?
- Menu walker: how to tell if a sub menu contains submenus?
- Getting parent object_id of child menu items in WordPress menu
- Incorrect Behavior on WordPress Main Menu
- WordPress menu issue after update
- Importing large product categories into wordpress menu
- Displaying a part of a menu containing the page the user is currently viewing and only it’s immediate children
- I can’t correctly display menu
- Conditional Nav Menu Inside Nav Menu Across Multisite Sites
- Reveal hidden submenus on page load – Twenty Fifteen theme
- Specific Page that convert Hyperlink to anchor in nav menu
- WordPress – Apperance > Menu
- Add a Submenu from Another Submenu in a Custom Theme
- Adding two submenus to a menu
- Menu support for touch devices
- collapse twenty twelve submenu in mobile version
- Two pages named the same thing, on a different level but conflicting url paths in menus and direct links
- ID of parent Menu
- Site with all content on the front page
- Some informations about the use of statics pages in WordPress
- How was this menu system created?
- how to mage the submenu open on wordpress active page
- my theme automatically adds new pages to menu
- nav tag wrapping around dropdown
- Add a page to a subscribers account
- Add acf custom fields so sub item in menus