Skip to main content
11 events
when toggle format what by license comment
Oct 14, 2014 at 16:27 comment added Ian Just noting for newcommers that the orderby issue mentioned has been fixed since WordPress 3.7 and documentation for using 'orderby' => 'meta_value' can be found here codex.wordpress.org/Class_Reference/…
Feb 14, 2013 at 15:41 vote accept Josh
Feb 14, 2013 at 15:41 comment added Josh Brilliant, thanks! I changed the wp_usermeta.meta_value to my prefix and it is sorted. I can't thank you enough. Really helped me out of a hole!
Feb 14, 2013 at 15:37 comment added Sunyatasattva Do you use a different table prefix for Wordpress than wp_? What is the result of var_dump($wp_user_query->query_where)?
Feb 14, 2013 at 15:24 comment added Josh Before I get string(23) "ORDER BY user_login ASC" After I get string(35) "ORDER BY wp_usermeta.meta_value ASC"
Feb 14, 2013 at 15:15 comment added Sunyatasattva Can you var_dump($wp_user_query->query_orderby) both before changing it and after?
Feb 14, 2013 at 15:06 comment added Josh I get a NULL back.
Feb 14, 2013 at 15:03 comment added Sunyatasattva That is weird, I just tested and it works for me. Mind that I edited the answer with an adjustment. Try again, and also tell me what happens if you var_dump($authors);
Feb 14, 2013 at 14:50 comment added Josh Thanks. Unfortunately I get no results with your code. When I remove the second query I get the same results in order of ID.
Feb 14, 2013 at 14:33 history edited Sunyatasattva CC BY-SA 3.0
Fixed a mistake
Feb 14, 2013 at 14:20 history answered Sunyatasattva CC BY-SA 3.0