Get the type of an advanced custom field (ACF) in a WP_Query loop [closed]
-
07-11-2019 - |
Question
When reading posts with WP_Query
how would I get the data type of an advanced custom field (textbox, date, number, repeater, …) ?
My code:
$loop = new WP_Query( $args );
$posts = $loop->get_posts();
foreach ( $posts as $post ) {
$custom_fields = get_post_custom($post->ID);
foreach ( $custom_fields as $field_key => $field_values ) {
// Get type of field? How?
}
}
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange