Skip to content

Instantly share code, notes, and snippets.

@andornagy
Last active December 29, 2015 16:09
Show Gist options
  • Save andornagy/7695473 to your computer and use it in GitHub Desktop.
Save andornagy/7695473 to your computer and use it in GitHub Desktop.
<?php
//* 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 );
}
<?php
//* Reposition the primary navigation menu
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_before', 'genesis_do_nav' );
//* Reposition the secondary navigation menu
remove_action( 'genesis_after_header', 'genesis_do_subnav' );
add_action( 'genesis_before', 'genesis_do_subnav' );
/*
* for the primary navigation menu
*/
.nav-primary {
position: fixed;
top: 0;
width: 100%;
z-index: 999;
}
/*
* for the secondary navigation menu
*/
.nav-secondary {
position: fixed;
top: 0;
width: 100%;
z-index: 999;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment