Title: WordPress ACF Order by
Last modified: August 31, 2016

---

# WordPress ACF Order by

 *  [turndriverside](https://wordpress.org/support/users/turndriverside/)
 * (@turndriverside)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/wordpress-acf-order-by/)
 * I am trying to order posts on my category page from newest to oldest and then
   from A to Z using an Advanced Custom Fields variable “inductee_last_name”.
 * Here’s my WP_Query:
 *     ```
       $currentCategory = single_cat_title("", false);
   
       	$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
       	$query_args = array(
       	  'category_name' => $currentCategory,
       	  'posts_per_page' => 30,
       	  'orderby'   => 'meta_value',
       	  'meta_key'  => 'inductee_last_name',
       	  'order' => 'DESC',
       	  'paged' => $paged
       	);
   
       	$the_query = new WP_Query( $query_args );
       ```
   
 * If I remove orderby and meta_key, my query works just fine. But as soon as they’re
   added in. It doesn’t pull anything up.
 * Any help would be greatly appreciated.
 * Thank you.

The topic ‘WordPress ACF Order by’ is closed to new replies.

## Tags

 * [ACF](https://wordpress.org/support/topic-tag/acf/)
 * [orderby](https://wordpress.org/support/topic-tag/orderby/)
 * [sorting](https://wordpress.org/support/topic-tag/sorting/)

 * 0 replies
 * 1 participant
 * Last reply from: [turndriverside](https://wordpress.org/support/users/turndriverside/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/wordpress-acf-order-by/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
