Skip to content

orderby term_order doesn't work #37

@orangutangle

Description

@orangutangle

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];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions