Enable identical menu on network sites

Worked it out. Assuming using a theme which has a menu location called ‘primary’, and you have just created a menu with an id contained in $menu_id $menu_locations = get_nav_menu_locations(); $new_menu_locations = array_map( ‘absint’, [‘primary’ => $menu_id]); $menu_locations = array_merge( $menu_locations, $new_menu_locations ); set_theme_mod( ‘nav_menu_locations’, $menu_locations ); This is pretty much exactly how WordPress itself … Read more

Migrate WP Menu between sites

I used this plugin a while back and it worked well, although the menu system wasn’t overtly complex, just had lots of items. https://wordpress.org/plugins/menu-exporter/ – It’s old, but could still do the trick. This will let you export your menu and import via the standard importer tool.

Add Featured Image and Title to wp_nav_menu items

The following code will get you the featured image for 3rd level of your navbar. You, have to pass the nav-menu id within wp_get_nav_menu_items(). It will get you the menu list (For more details). <ul> <?php $navMenu = wp_get_nav_menu_items(9); /*/Pass Nav Menu_id or Name*/ $previousMenuParent = $level = 0; foreach ($navMenu as $menu) { if($menu->menu_item_parent … Read more