Skip to content

Snippet: Add Content Above Mobile Toggle Menu

add_action( 'wp_footer', function() { ?>

	
		( function( $ ) {
			'use strict';
			$( window ).on( 'load', function() {
				var $nav = $( '.mobile-toggle-nav' );
				if ( $nav.length ) {
					$nav.prepend( '<div class="my-custom-toggle-nav-content container">Your custom html code here.</div>' );
				}
			} );
		} ( jQuery ) );
	

<?php }, PHP_INT_MAX );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top