I have a custom post type called "members", which has an ACF field connected. I try to get the content of that field. But when I try, I only get the regular post object. Not the ACF fields connected.
Here is what i am trying, but only getting the post object.
`
$featuredmembers = get_field('featured_member');
global $post;
//$featuredmembers has a field named "featured". That's the field I want.
$posts = get_posts([
'post_type' => 'members',
'post_status' => 'publish',
'posts_per_page' => -1,
'order' => 'ASC',
'orderby' => 'title'
]);
foreach ($featuredmembers as $post) {
print_r($post['featured']->ID);
echo get_field('featured');
}
`