dtbaker / envato-wp-theme-setup-wizard

A step by step setup wizard that runs after a ThemeForest theme has been activated.
GNU General Public License v2.0
202 stars 66 forks source link

menus do not connect. #25

Open MrVibe opened 7 years ago

MrVibe commented 7 years ago

Thanks for this amazing setup wizard. I am having some trouble in the menu linking. The menus are imported but the set_theme_mod does not assign the correct navigation menus which is causing issues. I am also not able to debug the "settings" part as the logs and errors do not appear in the ajax request return. Any help would be appreciated.

blicca commented 7 years ago

In export.php, there is a code like this:

$menus = get_terms( 'nav_menu' ); $menu_ids = array(); foreach ( $menus as $menu ) { if ( $menu->name == 'Main Menu' ) { $menu_ids['primary'] = $menu->term_id; } else if ( $menu->name == 'Quick Links' ) { $menu_ids['footer_quick'] = $menu->term_id; } } You need to change $menu->name == 'Your Menu Name(in wordpress > menu' and $menu_ids['primary'] to $menu_ids['yourmenuID(in functions.php']

dtbaker may help more..