WordPress.org

Forums

Ordering Taxonomy Terms (2 posts)

  1. bencarter78
    Member
    Posted 3 years ago #

    Hi there

    I am trying to order a list of terms from a particular taxonomy by name and I have looked through pages of content and cannot work it out!

    I currently have the following:
    $term = get_term_by( 'slug', get_query_var( 'procedure_area' ), get_query_var( 'taxonomy' ) );

    echo $terms->name . ' Procedures'

    This prints out the list but in date order.

    Can someone please help and tell me how I can order it by name?

    Thanks!

  2. Drew Jaynes
    4.2 Release Lead
    Posted 3 years ago #

    If you use get_terms instead you can set the orderby parameter.

Topic Closed

This topic has been closed to new replies.

About this Topic