By default, SuperSide Me adds menus to the menu panel in the order in which they are registered. A typical order might be:
- SuperSide Me Navigation Menu (registered by the plugin for use only in the panel)
- Primary Navigation Menu
- Secondary Navigation Menu
- Footer Navigation Menu
It’s absolutely possible to change this order using a filter. Here’s an example, which changes the order to Footer (4), Primary (2), SuperSide Me (1), Secondary (3):
add_filter( 'supersideme_get_menus', 'prefix_get_supersideme_menus' );
/**
* Replace and reorder the array of navigational menus in the SuperSide Me menu panel.
* @param $menus
*
* @return array
*/
function prefix_get_supersideme_menus( $menus ) {
return array(
'footer' => 'Footer Navigation Menu',
'primary' => 'Primary Navigation Menu',
'supersideme' => 'SuperSide Me Navigation Menu',
'secondary' => 'Secondary Navigation Menu',
);
}
Code language: PHP (php)
Note: this only changes the order in which the menus are added to the panel. If a menu location does not have a menu assigned to it, nothing will be added to the panel. So, it’s possible to set your custom order and include a navigation menu location which does not currently have a menu assigned, but which someday may.
Return to SuperSide Me