Skip to content

Instantly share code, notes, and snippets.

@carasmo
Last active January 26, 2016 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carasmo/ecd734e9f881a11a349c to your computer and use it in GitHub Desktop.
Save carasmo/ecd734e9f881a11a349c to your computer and use it in GitHub Desktop.
Genesis filter genesis_skip_links_output to add the registerd menu 'foo-menu' to the array. See other gist https://gist.github.com/carasmo/a988e9b4126cdb9f28e6
<?php
// don't include this
/** ====================================================================================
* add skip links to new nav
* filter 'genesis_skip_links_output' to add new
* https://gist.github.com/carasmo/a988e9b4126cdb9f28e6
==================================================================================== **/
function foo_nav_skip_links_output( $links ){
$foolink = $links;
array_splice( $foolink, 3 );
if ( has_nav_menu( 'foo-menu' ) ) {
$foolink['foo-nav'] = __( 'Skip to Foo Nav', 'your-text-domain' );
}
return array_merge( $foolink, $links );
}
add_filter( 'genesis_skip_links_output', 'foo_nav_skip_links_output' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment