Answer the question
In order to leave comments, you need to log in
How to change breadcrumbs for Woocommerce product categories?
How can I set a breadcrumb title for a Woocommerce product category ?
Yaost Seo - does not change. You can't even put something in the "Title for navigation chains" input.
I also made a custom field "bread_custom_name" for writing the title (I wrote the necessary titles for all categories into it), I display it through NavXT Breadcrumbs and change the title with this function:
add_filter('bcn_breadcrumb_title', 'my_breadcrumb_title_swapper', 3, 10);
function my_breadcrumb_title_swapper($title, $type, $id)
{
$post_id = get_queried_object()->term_id;
// $meta_value = get_term_meta( get_queried_object()->term_id, 'bread_custom_name', false );
if ($post_id == $id) {
if (get_term_meta( get_queried_object()->term_id, 'bread_custom_name', false )) {
$meta = get_term_meta( get_queried_object()->term_id, 'bread_custom_name', false );
$title = $meta[0];
}
}
return $title;
return $type;
return $id;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question