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
scroll top