Skip to content

Instantly share code, notes, and snippets.

@nickcernis
Created December 4, 2014 10:10
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickcernis/f43b795bef063ce3ffc1 to your computer and use it in GitHub Desktop.
Save nickcernis/f43b795bef063ce3ffc1 to your computer and use it in GitHub Desktop.
Fix for breadcrumbs appearing on iThemes ghost pages with Genesis themes
<?php // be sure to remove this line!
// Workaround for iThemes Exchange breadcrumbs issue.
// Strip breadcrumbs on iThemes Exchange ghost pages unless
// Genesis settings have enabled breadcrumbs on pages.
add_action( 'genesis_before_content', 'studiopress_it_exchange_breadcrumbs' );
function studiopress_it_exchange_breadcrumbs() {
global $post;
$is_ghost_page = strpos($post->post_name, 'it-exchange-ghost');
if ( $is_ghost_page === false || genesis_get_option( 'breadcrumb_page' ) )
return;
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
}
@jorgepadron
Copy link

It didn't work. I added your code to my Genesis Enterprise Pro functions.php, the breadcrumbs still shows on my iTheme Exchange 'store'.

@nickcernis
Copy link
Author

Jorge's issue was fixed via email. It's important to also uncheck the “Pages” tickbox in Genesis > Theme Settings > Breadcrumbs to stop breadcrumbs appearing on the iThemes Exchange pages.

If you'd like to be able to add breadcrumbs to regular pages by ticking the “Pages” box in the Breadcrumbs settings without also adding them to the Exchange pages, modify line 14 to look like this:

if ( $is_ghost_page === false )

@jorgepadron
Copy link

Awesome, thanks!

@uomopalese
Copy link

Worked!, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment