Reversed sequence of hierarchical taxonomy breadcrumbs
-
Hello, I am a new WordPress user and am finding your OceanWP theme very feature rich and useful.
I am using OceanWP Version: 1.7.4 and have noticed a problem with the breadcrumb function.
The page title breadcrumb for hierarchical taxonomies is incorrectly constructed.
For an example category hierarchy of a > b > c > d, the breadcrumb c > b > a > d is produced.I can’t find any option to change the sequence in Themes / Customisation. Is there any way of doing this from within WordPress?
The problem seems to be caused by oceanwp/inc/breadcrumb.php:function add_term_parents( $term_id, $taxonomy ) not actually reversing $parents array.
Change lines: 1293-1295
from:// If we have parent terms, reverse the array to put them in the proper order for the trail. if ( !empty( $parents ) ) $this->items = array_merge( $this->items, $parents );
to:
// If we have parent terms, reverse the array to put them in the proper order for the trail. if ( !empty( $parents ) ) $this->items = array_merge( $this->items, array_reverse( $parents ) );
- The topic ‘Reversed sequence of hierarchical taxonomy breadcrumbs’ is closed to new replies.