Good morning.
Anyone know of a field type which enables the selection of a post type.
I would like to use ACF to change the value for the WP_Query ‘post_type’ parameter like this example :
post_type' => get_field('field_name'),
There is not field for this. To do this you would use a select field and then you would populate the field’s choices using values returned by get_post_types() https://codex.wordpress.org/Function_Reference/get_post_types. See this for populating choices https://www.advancedcustomfields.com/resources/dynamically-populate-a-select-fields-choices/
Thanks John. Works perfectly.