Closed mplusb closed 4 years ago
This cause me disapear all taxonomy queries. Roll back to previus version
This fix also broke things for us as well. Line 520 -> $taxonomy = $args['taxonomy'][0]; produces an undefined offset Needs more testing before release.
Editing in a possible solution:
changing your function to this could solve the issue:
public function scporder_get_terms_orderby($orderby, $args) {
if (is_admin())
return $orderby;
$tags = $this->get_scporder_options_tags();
if (!isset($args['taxonomy']))
return $orderby;
$taxonomy = $args['taxonomy'];
if(is_array($taxonomy) && isset( $taxonomy[0] ) ) { // new addition
$taxonomy = $taxonomy[0];
}
if (!in_array($taxonomy, $tags))
return $orderby;
$orderby = 't.term_order';
return $orderby;
}
https://wordpress.org/support/topic/issue-with-sorting-taxonomies/