Relationship fields can either return an Objects or a Post IDs. That’s up to you (you can choose it when creating the field). Either way that object or ID would be returned inside an array, because the field gives you the option to select multiple values.
So in your loop:
$members = get_field('committee_members'); // assuming that's the field slug
//if it's returning the object
foreach($members as $member){
echo $member->post_title; //member name
}
That would assign all Committee Members to $members. Then you just need to loop through all $members and print their name, or anything else you need that’s related to that post. If the Committee Member also has ACF custom fields you can access it by using:
get_field("YOU_FIELD_NAME", $member->ID);
Related Posts:
- Meta Query “IN” doesn’t work with ACF checkbox filter
- List events by month
- Show ACF field from custom taxonomy and display on the single template
- Change message given when deleting post from custom post type
- Link users to a custom post type
- How to display Custom Post Type Post based on Tag with Shortcode Parameter?
- get_posts of Custom Post Type AND Custom Taxonomy
- WP_Query to select custom post type with Advanced Custom Fields (ACF) date
- How to update post meta on uploaded image from a custom form?
- Displaying custom field according to date
- Create short URL with auto 301 redirect
- Query entries from custom post type in an ACF flexible content field
- meta query not retrieving posts
- Fetch data from two custom post types and create multidimensional array for output to html table
- Custom front-end form for adding post – Category problem
- count & sum the value of custom field of the author post in dynamic posts
- Grouping custom wordpress post types by acf value
- WordPress – display relationship between blog posts and custom posts
- Custom sorting in post columns by ACF Pro Select Field
- Load info from customposttype into template page
- CPT: execute code after load if parameter is set
- ACF Post Content Not Being Searched
- Display related post content and custom field content
- Group/list/sort custom post type posts by date in tabs from acf datepicker field
- Can’t pick up a field created with Advanced Custom Fields
- Custom post tag images not displaying with ACF
- Get month and day from a Date Picker custom field
- using ACF datepicker to filter posts on a page
- Custom Post-type not returning the right child_of
- How to I add count of custom posts listed in a post as a prefix to its title
- Query menu_order custom post types
- Custom post status not working
- using the_permalink to echo an href into a
- Filter posts with ajax form and checkboxes
- Get custom post type REST API not working
- Insert slider (Custom Post Type) into pages
- get terms that have post with custom post type between 2 values
- Get all taxonomies for all post types
- Linking three taxonomies with ACF
- wordpress custom post type remove duplicate menu item
- WP_Query search posts by custom post type and custom taxonomy
- Loop through posts of a custom-post-type (event) and create .ics (iCal) file?
- Using wordpress template tags within an array
- If post has custom field then display css-class
- Replace text in post from cvs
- Get parent categories of custom post type
- the_content() not outputting anything (Advanced Custom Fields)
- Custom Tag Description unable to display just below and outside of the Loop
- Can one create multiple Custom Post Types with a for loop?
- How to add custom field to view-edit post type page
- Retrieve custom field from Contact Form 7 [closed]
- Static apple-app-site-association file with wordpress
- Breaking up CPT output into two columns
- How to set the seo title tag on a page by page basis?
- how to echo meta tag in header using php
- How to add/edit advanced custom fields on custom post type’s WordPress REST API?
- PHP question: how to combine syntax?
- Add first letter of titles to array, then compare arrays
- Custom Post Type page sorts differently on different environments
- widget_posts_args not using the number of posts in widget
- How To Post WordPress Custom Post Types to Twitter via IFTTT
- Undefined $post in wp_query
- Importing JSON feed giving Notice: Array to string conversion error
- List latest post out of 2 custom post types
- wp-includes does not contain a feed template
- Create a Dropdown Selector and Redirect for a Custom Taxonomy in WordPress?
- Having a repeating custom field in admin custom post type, what I’d go better with, for DB’s sake? ACF repeater or query a different post type?
- How to get the custom post data using post id in WordPress?
- See if the email exists or not
- Query filter by value in meta_value array
- Custom post ID & display information related to this ID
- Expire post to draft by date-picker custom field
- WP_Query – How To Query Only Custom Posts With No Children of Their Own?
- programmatically generated custom post type is created more than once
- WP_Query not using custom taxonomy categories on custom post type
- How would i insert a value of custom field from Advaced Custom Field into shortcode generated by Gravity Forms [closed]
- Auto generate excerpt from ACF field on a CPT that does not support excerpt or content
- Custom post type not pulling CSS
- Accessing download link from the loop with WP Download Manager Pro
- Button link display in shortcodes using custom field in ACF
- Create posts inside CPT post
- How do I link to a dynamic ACF button from a Custom Post type?
- Taxonomies are not showing in the category dropdown
- Combine multiple separate lists into one
- How to hide sub fields in a field group and also the entire field group if the answer selected is “no”
- Custom Taxonomy – fields
- Print post category name from a custom post type wordpress
- CPT post doesnt shows tags and category on backend admin page
- How to make sure, that only the selected post is changing?
- Custom permalink rewrite rules – how do I fix this?
- Automatically convert standard posts with custom fields to custom post types
- How to make a custom search template for custom taxonomy?
- Making my custom column sortable
- Show Custom Post Type taxonomy term that matches custom field
- Modifying and Displaying URL’s in a Post Template using parse_url
- Select Menu for Custom post Type does not save
- is_singular won’t call my functions?
- Inserting two categories
- WooCommerce – Complete Order when an action occurs
- How do loop categories post from according in WordPress? is it impossible to solve this problem?