Ready to get started?Download WordPress


How to sort category posts by meta_value? (2 posts)

  1. modeman
    Posted 1 year 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).

    Any advices?

  2. vtxyzzy
    Posted 1 year 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/

Topic Closed

This topic has been closed to new replies.

About this Topic