Support

Account

Home Forums ACF PRO Post Object Field Merging Duplicate Titles

Helping

Post Object Field Merging Duplicate Titles

  • 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/

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

The topic ‘Post Object Field Merging Duplicate Titles’ is closed to new replies.