Skip to content

Instantly share code, notes, and snippets.

@navalon
Forked from srikat/functions.php
Created October 29, 2016 01:07
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 navalon/ed5cccade377e71551054101bd6cd090 to your computer and use it in GitHub Desktop.
Save navalon/ed5cccade377e71551054101bd6cd090 to your computer and use it in GitHub Desktop.
How to show breadcrumbs only on full width content pages in Genesis. https://sridharkatakam.com/how-to-show-breadcrumbs-only-on-full-width-content-pages-in-genesis/
// Show breadcrumbs (if enabled in Genesis theme settings) only on full-width-content pages
add_action( 'genesis_before_content', 'sk_conditional_breadcrumbs' );
function sk_conditional_breadcrumbs() {
// get the page layout
$site_layout = genesis_site_layout();
// if the page uses full-width-content layout, abort.
if ( 'full-width-content' == $site_layout ) {
return;
}
// remove Breadcrumbs
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment