Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

orderby term_order doesn't work #37

Open
orangutangle opened this issue Mar 19, 2020 · 0 comments
Open

orderby term_order doesn't work #37

orangutangle opened this issue Mar 19, 2020 · 0 comments

Comments

@orangutangle
Copy link

There is an error in hicpo_get_terms_orderby which prevents the get_terms orderby override from being applied:

$tags = $this->get_hicpo_options_tags();
		
if( !isset( $args['taxonomy'] ) ) return $orderby;
		
$taxonomy = $args['taxonomy'];
if ( !in_array( $taxonomy, $tags ) ) return $orderby;

Because $taxonomy is an array, the in_array check always fails and the orderby is never modified to 't.term_order'.

The solution is to change the line to:

$taxonomy = $args['taxonomy'][0];
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant