Home › Forums › Backend Issues (wp-admin) › Sorting search results by ACF date fields › Reply To: Sorting search results by ACF date fields
Yes, the field names on the two post types would have to be the same to get the posts intermingled.
In order to use 2 different field names the fields must have some relationship to each other.
The only other options is would be to do two different queries, add the value of the acf field as a property of each post object, merge the results of both and then manually sort them in one of the php array sorting functions, likely with usort().
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.