A responsive, mobile first, accessible navigation proposal for Genesis child themes.
Switch branches/tags
Nothing to show
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
gulp Initial commit May 31, 2018
includes Update body class check/change Jun 28, 2018
js Fix combined menu behavior Jul 17, 2018
languages Initial commit May 31, 2018
sass Initial commit May 31, 2018
sprites Initial commit May 31, 2018
README.md Add readme FAQ Jun 5, 2018
gulpfile.js Initial commit May 31, 2018
package.json Initial commit May 31, 2018
style.css Initial commit May 31, 2018


Leaven Responsive Menu

This is a project to help add a mobile first, accessible, responsive, SVG driven menu to a Genesis child theme. Fallback styling for browsers which do not support/allow JavaScript is included.


This project consists of four elements:

  1. JavaScript: the script files should be added to your theme /js folder.
  2. CSS: the project includes both the Sass partials and a compiled style.css. You can add the partials to your own project and import per your workflow, or copy/paste the style.css contents into your theme stylesheet, replacing all navigation styles. Only navigation location specific styling should be needed beyond what's in this project.
  3. Sprites: the sprites in the code are from the Font Awesome free SVG icons. You can use these or replace them with your own. The code in the svg.php file expects the icons to be in the /sprites folder.
  4. PHP: five individual files are included, some of which are optional. You can either copy the individual files to your theme and include them, or copy the individual functions into your functions.php file.
    • body-class.php: preemptively adds a no-js body class to the page. This is removed using JavaScript before the page loads, to avoid styling flashes.
    • navigation.php: sets up the script and localization variables for the responsive menu.
    • navigation-search.php: adds a search input to the primary navigation menu
    • svg.php: function to add SVG icons to menus, search forms, etc.
    • svg-navigation.php : function to scan a social menu and add SVG icons automatically, if possible.

Frequently Asked Questions

How do I tell the theme about a mobile menu plugin?

In the leaven_get_navigation_localization_args function, look for the $desktop_only variable. It's currently set to check for SuperSide Me:

	// optional: set the menu script to perform on desktop only. set to false to use the mobile menu, too
	$desktop_only = (bool) function_exists( 'supersideme_has_content' ) && supersideme_has_content();

If SuperSide Me is not active, it will be false. You can change this variable to anything you like, and check for any mobile menu plugin you prefer to use.



  • initial release