• I have the menus created and already placed on the pages needed and in sidebars needed. What I would like to do is have and option to add a newly created page to an existing menu on the Page creation page.

    Either a plugin or coding is a viable option.

    Thanks in advance

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello DaddioD
    You dont need to write any code or use any plugin for your purpose.Just go to Dashboard->Appearance->Menus select your menu ,there is an option of “Automatically add new top-level pages to this menu” check this option and save menu.Now all newly created pages will automatically get added in to this menu.
    Hope this will help you.

    Thread Starter DaddioD

    (@daddiod)

    That is not exactly what I am trying to do. I have multiple menus that a page could be added to. I would like the user to choose which menu to add the new page to as they create the page. I don’t want all pages added to the same menu.

    Hello DaddioD
    Now i get you,yes it can be tricky and it requires a bit of programming skills as well so better you hire a developer for it .
    Let me brief you the scenario through which it could be done
    1-You should first create meta box for your pages which contain a dropdown of your all menus,you can get your all menus through “get_terms( ‘nav_menu’, array( ‘hide_empty’ => true ) );”.
    2-Now when you create any page then you have an option to select a menu,you can dynamically add that page to the selected menu.For adding dynamic content to menus through code you can refer to the below link
    https://www.daggerhart.com/dynamically-add-item-to-wordpress-menus/

    Thread Starter DaddioD

    (@daddiod)

    Thanks, I will read over the link and let you know what I come up with.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Add Menu selection to page creation’ is closed to new replies.