Snippets: Remove Portfolio Categories From Breadcrumbs


// Remove portfolio categories from breadcrumbs trail
function myprefix_remove_portfolio_cats_from_breadcrumbs( $trail ) {
	if ( is_singular( 'portfolio' ) ) {
		unset( $trail['portfolio_categories'] );
		unset( $trail['categories'] );
	}
	return $trail;
}
add_filter( 'wpex_breadcrumbs_trail', 'myprefix_remove_portfolio_cats_from_breadcrumbs', 20 );
All PHP snippets should be added via a child theme's functions.php file.