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
- “add_post_type_support” with Custom Post Type & ACF
- Get Post Primary Category
- Custom Post type with ACF in REST API, how do I get those values?
- Weird problem happening with custom taxonmy when creating/updating posts
- ACF simple text field value not showing
- A good strategy to print custom posts (offer) that are checked inside the metabox of a post?
- Post Object Filter by Custom Field, not title (ACF)
- Custom Post Types not showing, custom WP_Query
- Admin notice not displaying
- Can’t get order_by meta_value_num to work properly
- Create custom post type on successful woocommerce order [closed]
- Rewrite WordPress URL to show CPT meta field data
- Create 3 Level Relations with ACF and WordPress
- Custom Post type and Custom Field WP_Query
- Display multiple custom post types and sort them chronological by one of their fields
- Adding custom tables to WordPress
- Taxonomy Archive: Display only one post per term from separate custom taxonomy
- Very Slow Page – How to Optimize # of Queries?
- Dynamic page outside WordPress
- Using wordpress template tags within an array
- Getting the URL of the parent page
- Custom query to filter posts that have current post as a taxonomy [closed]
- Multiple ACF Repeaters within a Custom Post Type
- How to change post featured image using a custom field of category?
- Custom post type permalink returns bad url
- Return the thumbnail meta data for getter and setter
- How to display selected taxonomies by their parent
- Validate custom fields before save using WordPress Rest API
- Custom Field Order by Last Name and First Name
- Pagination for custom php code
- What’s the difference between same wp functions get_posts(); functions in different form?
- Changing number of posts per page on CPT-archive.php, have tried 20-30 code chunks so far
- How to: Display ACF [fields] on Custom Post Types Utilising WordPress ‘Hooks’? [closed]
- Custom Post Type Loop throws 500 error when used in widget
- how to check if custom post type column already exists?
- Get posts from a custom post type by child categories of a parent category
- Received nothing after executing AJAX post function
- How to make sure content doesn’t display if selection is empty
- Custom Post-Type not in admin menu
- get the custom post type title/name
- Page vs Custom Post Types Differences/Issues
- Custom fields vs. Custom post types for a Portfolio Website
- If post has custom field then display css-class
- Push metadata in array
- How to customize a permalink (URL) structure?
- Troubles with saving metabox
- Retrieve value of a category’s custom field
- CPT + CMB2: data not displaying for only first post in loop
- How to make a field appear only if a post meta field has a defined value?
- Replace text in post from cvs
- Get parent categories of custom post type
- How can I dynamically add a post to a custom post type which uses a custom field?
- Problem with WordPress query on page using custom fields
- Can I list a custom post type within another custom post type in the admin area?
- the_content() not outputting anything (Advanced Custom Fields)
- Get custom post type list for every category shortcode
- How do i calculate the total of values of custom fields in custom post types?
- I would like to have different styles for my posts based on the content of each post
- Checking if Post Title is Unique as Loop Criteria
- Query & Order posts by custom fields
- Custom post type – get_day_link()
- Set URL link to featured image of custom post type
- How to add a post slug to a url?
- Custom Tag Description unable to display just below and outside of the Loop
- AJAX load more for different custom post type loops
- Add custom ID to CPT posts only create not update
- Custom Taxonomy terms aren’t getting referenced or saved in Quick Edit or Bulk Edit, only on Single product page?
- Bulk Update Custom Fields for Custom Post Types
- On update or create post redirect to current post position in list
- ACF Field on CPT Slug