Skip to content

Instantly share code, notes, and snippets.

@reasonstousegenesis
Created November 11, 2015 03:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reasonstousegenesis/6cb65248425a23facad9 to your computer and use it in GitHub Desktop.
Save reasonstousegenesis/6cb65248425a23facad9 to your computer and use it in GitHub Desktop.
Check if a nav menu is supported with Genesis
<?php
// Paste the code BELOW this line into your child theme functions.
/**
* Check if a nav menu is supported with Genesis
*
* @author Reasons to Use Genesis
* @link http://reasonstousegenesis.com/genesis-nav-menu-supported/
*/
add_action( 'your_desired_hook', 'rtug_nav_menu_supported' ); // replace your_desired_hook with your desired hook
function rtug_nav_menu_supported() {
if ( genesis_nav_menu_supported( 'ID' ) ) { // replace ID with the ID of your menu location
// your code here
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment