reverse parents term array
-
hi, i do not know if this is an error or not. i found that the plugin provide my term taxonomy parents backwards. like this:
– lips
— lips makeup
— glossy lipsis rendered like this:
/ lips makeup / lips / glossy lipsi search through code and i found these lines from breadcrumb-trail\inc\breadcrumbs.php line 983
/* 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 ); }
i changed it to this and it fixed my problem:
/* If we have parent terms, reverse the array to put them in the proper order for the trail. */ if ( !empty( $parents ) ){ $parents = array_reverse($parents); // added line $this->items = array_merge( $this->items, $parents ); }
i hope this will help someone.
thanks for this great plugin
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘reverse parents term array’ is closed to new replies.