skip to Main Content

Add Content Above Mobile Menu

This snippet shows you how you can insert custom content to the top of the mobile menu using theme hooks. Note: you can also do this via the Theme Actions panel.

/**
 * Add Content Above the Mobile Menu.
 *
 * @link https://total.wpexplorer.com/docs/snippets/add-content-above-mobile-menu/
 */
add_action( 'wpex_hook_mobile_menu_top', function() {
	echo '<div>Before mobile menu</div>';
} );
All PHP snippets should be added via child theme's functions.php file or via the Code Snippets Plugin (or alternative plugin)
Back To Top