This code enables you to use conditional tags to remove the Genesis Breadcrumbs from any page or post. Once set in Genesis > Theme Settings > Breadcrumbs:
Here’s the code you can add to your child themes functions file:
add_action( 'genesis_before_loop', 'remove_breadcrumbs_conditionally', 5 );
function remove_breadcrumbs_conditionally() {
if ( is_post_type_archive( 'portfolio' ) ) {
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
}
}
The above code removes the breadcrumbs from the portfolio post type archive page only.
Was This Tutorial Helpful?