Home Forums ACF PRO Sort custom post types by subfields


Sort custom post types by subfields

  • Is it possible to sort custom post types according to a subfield?

    for example,

    A Plot is a custom post type containing a group with the following fields;


    Is it possible to use either get_posts() or WP_query() to get a bunch of Plots and to sort them by one of the subfields?

    Something similar to this but for a subfield within a group would be ideal.


  • No, you cannot sort by sub fields. Each sub field has a different meta_key. See my post here

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.