Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Breadcrumb Update for Yoast Breadcrumbs Path in Custom Post
add_filter( 'wpseo_breadcrumb_links', 'wpse_100012_override_yoast_breadcrumb_trail' );
function wpse_100012_override_yoast_breadcrumb_trail( $links ) {
global $post;
if (is_tax( 'df_product_category' )) {
$breadcrumb[] = array(
'url' => get_post_type_archive_link( 'df_wordpress_product' ),
'text' => 'Products',
);
array_splice( $links, 1, -2, $breadcrumb );
}
return $links;
}
@mrkdevelopment

This comment has been minimized.

Copy link
Owner Author

commented Aug 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.