Forums Forums Search & Filter Pro Order Terms

Viewing 4 posts - 1 through 4 (of 4 total)
  • Anonymous
    #48075

    I can’t get the order/sort settings to be respected 100%

    http://prntscr.com/betat1

    I’ve tried different options slug vs name save always refetch cache but there’s always something out of order.

    Curious if you’re aware of the issue, or have a solution I could try?

    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 4 posts - 1 through 4 (of 4 total)