Modifications from Default Genesis Hooks
Sal Ferrarello edited this page May 29, 2015
·
1 revision
In general Bootstrap Genesis tries to use Genesis as close to out of the box as possible. There are instances where moving code from one hook to another make sense, and in those instances the changes will be recorded here.
By default in Genesis, the nav and subnav and hooked in as follows
add_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_after_header', 'genesis_do_subnav' );
These changes are made to move the navigation to the top of the page, which better matches the default Bootstrap styling
from lib/nav.php
// remove primary & secondary nav from default position
remove_action( 'genesis_after_header', 'genesis_do_nav' );
remove_action( 'genesis_after_header', 'genesis_do_subnav' );
// add primary & secondary nav to top of the page
add_action( 'genesis_before', 'genesis_do_nav' );
add_action( 'genesis_before', 'genesis_do_subnav' );
remove_action( 'genesis_before', 'genesis_do_nav' );
remove_action( 'genesis_before', 'genesis_do_subnav' );