Title: dlm1897's Replies | WordPress.org

---

# dlm1897

  [  ](https://wordpress.org/support/users/dlm1897/)

 *   [Profile](https://wordpress.org/support/users/dlm1897/)
 *   [Topics Started](https://wordpress.org/support/users/dlm1897/topics/)
 *   [Replies Created](https://wordpress.org/support/users/dlm1897/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/dlm1897/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/dlm1897/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/dlm1897/engagements/)
 *   [Favorites](https://wordpress.org/support/users/dlm1897/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to sort custom post by custom date field](https://wordpress.org/support/topic/how-to-sort-custom-post-by-custom-date-field/)
 *  Thread Starter [dlm1897](https://wordpress.org/support/users/dlm1897/)
 * (@dlm1897)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/how-to-sort-custom-post-by-custom-date-field/#post-3369475)
 * Thanks for the response t-p. However, the following change seemed to have no 
   effect on the list of events.
 *     ```
       <?php
       $temp = $wp_query;
       $wp_query = null;
       $wp_query = new WP_Query( array( 'post_type' => 'event', 'meta_key' => 'sortdate', 'order_by' => 'meta_value', 'order' => 'ASC' ) );
       $wp_query->query('post_type=event' . '&paged=' . $paged . '');
       ?>
       ```
   
 * I’m really stuck on this one.

Viewing 1 replies (of 1 total)