Support

Account

Home Forums General Issues It is possible to select a custom post type via ACF? Reply To: It is possible to select a custom post type via ACF?

  • It would be impossible to create a solution that fit everybody’s needs. So they provide a way to do anything you want thanks to the acf/load_field/name=$name filter, which is even better.

    The documentation John shared does give examples.
    From the first section (Populating Choices From a Text Area Field), the author of this thread would basically just need to replace $choices = get_field('my_select_values', 'option', false); with $choices = get_post_types(); and also remove the two next lines that trim the string as it is already an array of name.