Created
August 9, 2013 14:52
-
-
Save brunomertins/6194255 to your computer and use it in GitHub Desktop.
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 | |
//* Do NOT include the opening php tag | |
//* Enqueue sticky menu script | |
add_action( 'wp_enqueue_scripts', 'custom_enqueue_script' ); | |
function custom_enqueue_script() { | |
wp_enqueue_script( 'sticky-menu', get_stylesheet_directory_uri() . '/js/sticky-menu.js', array( 'jquery' ), '', true ); | |
} | |
//* Reposition the secondary navigation menu | |
remove_action( 'genesis_after_header', 'genesis_do_subnav' ); | |
add_action( 'genesis_before', 'genesis_do_subnav' ); |
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 Menu | |
---------------------------------------------------------------------------------------------------- */ | |
#subnav { | |
background-color: #1e1e1e; | |
display: none; | |
position: fixed; | |
top: 0; | |
width: 100%; | |
z-index: 999; | |
} | |
#subnav .wrap { | |
margin: 0 auto; | |
position: relative; | |
width: 1152px; | |
} | |
#subnav .genesis-nav-menu.menu-secondary { | |
border: none; | |
} | |
.genesis-nav-menu.menu-secondary a { | |
color: #fff; | |
padding: 20px; | |
padding: 1.25rem; | |
} | |
.genesis-nav-menu.menu-secondary li.sticky-right { | |
float: right; | |
} | |
.genesis-nav-menu.menu-secondary li li a, | |
.genesis-nav-menu.menu-secondary li li a:link, | |
.genesis-nav-menu.menu-secondary li li a:visited { | |
background-color: #1e1e1e; | |
border: 1px solid #fff; | |
border-top: none; | |
color: #fff; | |
padding: 20px; | |
padding: 1.25rem; | |
} | |
.genesis-nav-menu.menu-secondary li li a:hover { | |
color: #ff2a00; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment