WordPress.org

Ready to get started?Download WordPress

Forums

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

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

    Any advices?

  2. vtxyzzy
    Member
    Posted 6 months 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/

Reply

You must log in to post.

About this Topic