WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Tax_Query and Orderby (2 posts)

  1. formica
    Member
    Posted 2 years ago #

    Hi there

    Apologies but can't for the life of me get the 'orderby' and 'order' to work. Can anyone point me in the right direction as to what I'm doing wrong please?

    $args = array(
         'orderby' => 'title',
         'order' => 'DESC',
         'tax_query' => array(
    	  array(
    	  'taxonomy' => 'therapies',
    )));
    
    $query = new WP_Query( $args );
  2. formica
    Member
    Posted 2 years ago #

    Well... couldn't figure out why it wasn't working but got a work around from the codex..

    global $query_string;
    query_posts( $query_string . '&order=ASC' );

    No doubt something I was / am doing wrong.

Topic Closed

This topic has been closed to new replies.

About this Topic