Function to get custom field from Organizer

Home Forums Calendar Products Events Calendar PRO Function to get custom field from Organizer

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #63972
    amycarolyn
    Participant

    I’ve used the examples in organizer.php to attempt to write a function to get a new field I’ve added to the Organizer custom post type for a logo.

    If it was the single Organizer page, I could do something like this (I’m using Advanced Custom Fields):

    But I need to retrieve this information on the single event page. I am using individual template tags for the organizer rather than the events meta.

    I found a similar topic in my forum search but the answer was not posted in the thread. The user said they resolved their own issue and the ticket was closed.

    #63973
    amycarolyn
    Participant

    Here is the missing snippet.
    $organizerlogo = get_field(‘organizer_logo’, $postId);
    echo wp_get_attachment_image($organizerlogo, ‘meta-thumb’);

    #64350
    Kelly
    Participant

    Hi, amycarolyn. Thanks for getting in touch about your customization.

    Unfortunately, we are unable to offer support for functions within AFC. Hopefully, you’ll find the help you need in our documentation: http://docs.tri.be/

    Please let us know if there’s anything else we can clarify about our plugin.

    #64613
    amycarolyn
    Participant

    Your documentation doesn’t cover this, am I crazy or looking in the wrong spot? I’ve seen you tell people on other threads to use ACF to add an image so I would assume it’s possible. Any recommendations? Who could I hire to tell me the answer?

    #64721
    Kelly
    Participant

    Hi, amycarolyn. Sorry you’re not finding the docs helpful.

    Here’s what you need to get the Organizer ID from within a single event:

    $organizer_id = tribe_get_organizer_id( get_the_ID() );

    Hopefully, that’s enough to get you on the right track!

    #66236
    amycarolyn
    Participant

    Thanks, this helped me get the code working. Much appreciated!

    #66332
    Kelly
    Participant

    I’m so glad to hear it, amycarolyn!

    Since it sounds like you’re set here. I’m going to close this thread. Please start a new one if anything else comes up.

    Thanks for being a TEC user

    #980815
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Function to get custom field from Organizer’ is closed to new replies.