Snippets: Display A Custom Menu

// Use menu with ID 60 for blog all blog posts and archives
function myprefix_display_custom_menu_for_blog( $menu_location ) {

	// Display different menu for blog
	if ( wpex_is_blog_query() ) {
		return '60';
	}

	// Return menu
	return $menu_location;

}
add_filter( 'wpex_custom_menu', 'myprefix_display_custom_menu_for_blog' );

Snippet Type: PHP

Posted Under: Menu

All PHP snippets should be added via a child theme's functions.php file.