The original question just involved getting ACF fields on the owner of the event not on the speaker. There is no place to specify the speaker (or speakers) in Events Manager. Event Manager is collecting information on the event owner so it’s easy to get the ACF fields on the owner. You would have to create a custom attribute (e.g., #_ATT{SPEAKER}) and then modify the template for the event form to create a pulldown list to fill in this field (it would select the speaker from the list of users) and then the userid would get stored in the post meta field for #_ATT{SPEAKER}. Once this userid for the speaker is available it could then be used for custom attributes (for example #_EVENTMASTERURL might be one) and when returning the value it would use the #_ATT{SPEAKER} field (which is stored as a post meta field) to get the userid and from there it could look up the ACF field value.
If you create a role called “speaker” for the users who are speakers for events you could use the following code to generate a pulldown list of the speakers:
function get_speaker_dropdown() {
$args = array(
'role' => 'speaker',
'orderby' => 'display_name',
'order' => 'ASC',
);
$select = wp_dropdown_users( $args );
return $select
}
-
This reply was modified 1 year, 8 months ago by
joneiseman.