- This topic has 3 replies, 2 voices, and was last updated 9 years, 7 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › Order Terms
Hi
Ross has taken a look at this
Can you stick this code in one of your templates (like footer) to see what it outputs?
$terms = get_terms(array(
'taxonomy' => 'pa_vehicle-year',
'hide_empty' => false,
'order' => 'ASC',
'orderby' => 'name'
));
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
echo '<ul>';
foreach ( $terms as $term ) {
echo '<li>' . $term->name . '</li>';
}
echo '</ul>';
}
And give me the list of model years it makes?
What we are doing is using this:
https://developer.wordpress.org/reference/functions/get_terms/
And looping through these and it will tell us if the standard theme sorting is working for terms.