Hi there! We’re using ACF Pro for everything, and love the heck out of it! Well done, sir.
One small thing we haven’t been able to sort out is a bug (or feature) with the Post Object field type – it seems to be showing unique post titles, meaning it’s merging duplicates. For instance:
– We have a CPT for “Product”
– Two products have the same title, but different specifications
– We pull this CPT into Post Object and it shows only one of those product titles
Potential solutions we came up with:
– Show all posts no matter what (maybe there’s an option for this when creating the field? Slugs are unique, but titles are the same.)
– Allow the drop-down to include additional data from another field on the posts it’s loading (Product – Spec)
Is there any way we can tackle either of these solutions with a hook or filter?
Thanks!
Scott
Hi @machinescott,
Thanks for the post.
I would recommend you hook into the acf/fields/post_object/query filter and modify the $args that are used to query the posts on the field type.
Here is more info on this filter: https://www.advancedcustomfields.com/resources/acf-fields-post_object-query/