acf_get_post_type()
Get an ACF CPT as an array
No Hooks.
Returns
Array|false. The post type object.
Usage
acf_get_post_type( $id );
- $id(int|string) (required)
- The post ID being queried.
acf_get_post_type() acf get post type code ACF 6.8.8
function acf_get_post_type( $id ) {
return acf_get_internal_post_type( $id, 'acf-post-type' );
}