• AJD

    (@ajd)


    I am looking for a way to use Advanced Custom Fields as event attributes. ACF used to use the regular WordPress custom fields, but now it uses its own fields.

    I am trying to create an events list format that inserts custom fields from the user profile.

    Can you point me in the right direction for achieving this?

    It sounds like the only way may be to do a template override. In this case can I also do an override of the Formats?

Viewing 4 replies - 16 through 19 (of 19 total)
  • this link is about #_ATT, sorry
    I asked about ACF – how to create your own placeholder from the ACF field so that the Event Manager accepts it

    That post was showing how to #_ATT placeholders into the single event page. You could also add your own placeholders in the single event page (or on the event list page) using the same method (e.g., #_EVENTMASTER).

    I know how to use Event Manager tools to make fields using #_ATT.
    But I would humbly like to say that the original message from AJD is just about ACF, and I am also asking about ACF.

    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.
Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Use an ACF Field for Event Attribute?’ is closed to new replies.