• In my multisite network (sub directory style), I first import a wordpress site using a php script that calls wp import. This works fine except that the menu settings are not preserved.

    For example, after creating mydomain.net/new_one, my menu: About | Contact | Home, but in the source of the imported site I have set the order to be: Home | About | Contact.

    If I go into the Dashboard of mydomain.net/new_one, I can set the Appearance->Menu choice checkbox and that selection creates the desired menu arrangement.

    How do I set the choice programmatically in my php script, after I use wp import?

    • This topic was modified 4 years, 9 months ago by Matt.
Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    The menu order is established with the “menu_order” property of each “nav_menu_item” post type. The menu items in a particular menu are determined by the assigned “nav_menu” taxonomy term. You would query for such items and modify each property as desired.

Viewing 1 replies (of 1 total)
  • The topic ‘How to set up menus after import programmatically’ is closed to new replies.