Hi @moxiecreek,
you want to assign your menus to the predefined menu locations right?
You can do it with this pt-ocdi/after_import action:
function ocdi_after_import_setup() {
// Assign menus to their locations.
$primary = get_term_by( 'name', 'Primary', 'nav_menu' );
$secondary = get_term_by( 'name', 'Secondary', 'nav_menu' );
set_theme_mod( 'nav_menu_locations', array(
'primary' => $primary->term_id,
'secondary' => $secondary->term_id,
)
);
}
add_action( 'pt-ocdi/after_import', 'ocdi_after_import_setup' );
In the example above I’ve used the names of your menus to be “Primary” and “Secondary”, so change that, if your menu names are different. Also in the second block of code you should change the “primary” and “secondary” menu locations, if you have them defined as something else.
Let me know, if you need additional help, or if I misunderstood your question.
Take care!
Hi @capuderg,
Thanks for your quick response. I was able to get this to work finally! I actually renamed my menus to something other than “Primary” and “Secondary” and that helped to sort it all out.