I don’t understand using rigid widgets having the ability to edit the theme. So, I call attention to the wp_nav_menu()
for flexibility improvement.
functions.php
:
<?php
// register menu in `side_menu`
register_nav_menu( 'side_menu', __( 'Sidebar', 'theme-slug' ) );
Now you can build your own menu under Appearance -> Menus.
Use wp_nav_menu()
function to display your menu in the header.php
:
<?php
$args = array(
'theme_location' => 'side_menu',
'menu' => 'side_menu',
// here goes the container
'container' => 'div',
// here goes the container classes
'container_class' => 'menu-side-menu-container menu-sidebar',
// more arguments if different fron default
// See the link at the end
);
wp_nav_menu($args);
For more information see: