-
I would need to display the subcategories of product in the store on product in breadcrumbs. I used this code from your forum:
add_filter( ‘rank_math/frontend/breadcrumb/main_term’, function( $term, $terms ) {
$child_terms = get_term_children( $term->term_id, $term->taxonomy );
if ( empty( $child_terms ) ) {
return $term;
}$child_term = get_term_by( ‘term_id’, end( $child_terms ), $term->taxonomy );
return $child_term;
}, 10, 2 );The code is currently not used.
Subcategories are shown but incorrectly. Can you please help me? Thank you
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The ticket ‘Breadcrumbs problem’ is closed to new replies.