Created
November 11, 2015 03:11
-
-
Save reasonstousegenesis/6cb65248425a23facad9 to your computer and use it in GitHub Desktop.
Check if a nav menu is supported with Genesis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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