Created
December 4, 2014 10:10
-
-
Save nickcernis/f43b795bef063ce3ffc1 to your computer and use it in GitHub Desktop.
Fix for breadcrumbs appearing on iThemes ghost pages with Genesis themes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awesome, thanks!