Support » Fixing WordPress » How to sort category posts by meta_value?
3 years, 2 months ago
Hello, im using WP-Types plugin and i need to sort category posts by meta_value.
Now i have this code: http://pastebin.com/0bYqcBDU
I need all posts with meta_value “wpcf-data-nuo” empty field go down and posts with typed meta_value goes up (sorting).
3 years, 1 month ago
Here is an article that shows one way to modify the query with filters: http://wordpress.mcdspot.com/2013/01/25/sort-on-presence-of-custom-field-field-value-then-date/