orderby meta_value_num DESC and meta_value ASC
-
I created a custom post type and I want the archive query to order the posts by
-
custom-field-1
, which is a boolean field and returns either'1'
or'0'
inDESC
order custom-field-2
, which contains text inASC
order (from A to Z)
Question 1:
How do approach this functionality? Ameta_query
does not offer multipleorderby
options, does it? Neither does the new, more powerfulorderby
that was introduced in WP 4.0 I guess?Question 2:
If this is an option – how to use SQLJOIN
in apre_get_posts
filter? Is that possible?Question 3:
I don’t think it would be a nice solution but how about using twoWP_Queries
? -
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘orderby meta_value_num DESC and meta_value ASC’ is closed to new replies.