Adding additional menus to the Salient Theme centered menu layout

By April 21, 2020June 24th, 2020Start

The Salient centered logo variant of the theme layout does not have the ability to use the second header layout option. This is annoying, so I fixed it and added the top header menu back in.

Top Right Menu:


// Add to functions
function wallys_th_addon_menu() {
register_nav_menu('th-top-menu',__( 'TH Top Menu Right' ));
}
add_action( 'init', 'wallys_th_addon_menu' );

// Add to themes/salient/includes/partials/header/secondary-navigation.php
<?wp_nav_menu( array( 'theme_location' => 'th-top-menu', 'container_class' => 'th_menu_class' ) ); ?>

Top Left Menu:


// Add to functions
function wallys_thl_addon_menu() {
register_nav_menu('thl-top-menu',__( 'TH Top Menu Left' ));
}
add_action( 'init', 'wallys_thl_addon_menu' );

// Add to themes/salient/includes/partials/header/secondary-navigation.php
<?wp_nav_menu( array( 'theme_location' => 'thl-top-menu', 'container_class' => 'thl_menu_class' ) ); ?>

Make it look pretty – CSS

Get the Salient Theme Here:
https://themeforest.net/item/salient-responsive-multipurpose-theme/4363266