Created
July 15, 2016 19:17
-
-
Save KFleeger/1ecf5a8279990c115474571d844788b4 to your computer and use it in GitHub Desktop.
Sticky Navigation for Header Right Menu
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
//* Sticky Navigation for Header Right Menu | |
add_action( 'wp_enqueue_scripts', 'hello_pro_add_sticky_nav_script' ); | |
function hello_pro_add_sticky_nav_script() { | |
global $wp_registered_sidebars; | |
if ( isset( $wp_registered_sidebars['header-right'] ) ) { | |
wp_enqueue_script( 'sticky-nav-script', get_stylesheet_directory_uri() . '/js/sticky-nav.js', array('jquery'), '1.0.0' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment