Forums Forums Search & Filter Pro Order Terms

Viewing 3 posts - 1 through 3 (of 3 total)
  • Trevor
    #48106

    How very odd Craig. I think Ross may need to take a look at this, but he will be a bit pushed for time. Using a private reply, can you provide admin logins for WP and also ftp credentials.

    The URL of the search page would be useful too.

    Anonymous
    #48123
    This reply has been marked as private.
    Trevor
    #48650

    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.

Viewing 3 posts - 1 through 3 (of 3 total)