Last active
November 5, 2015 13:50
-
-
Save cjkoepke/50d82a830fafae3208bb to your computer and use it in GitHub Desktop.
Add a blank overlay div to the DOM for clicking.
http://www.calvinkoepke.com/add-a-mobile-friendly-off-canvas-menu-in-genesis/
This file contains hidden or 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 | |
//* Do NOT include the opening PHP tag | |
/** | |
* Add the overlay div that will be used for clicking out of the active menu. | |
* @author Calvin Koepke (@cjkoepke) | |
* @link http://www.calvinkoepke.com/add-a-mobile-friendly-off-canvas-menu-in-genesis | |
*/ | |
add_action( 'genesis_before', 'ck_site_overlay', 2 ); | |
function ck_site_overlay() { | |
echo '<div class="site-overlay"></div>'; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment