Home › Forums › Calendar Products › Events Calendar PRO › Function to get custom field from Organizer
- This topic has 7 replies, 3 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
August 31, 2013 at 10:51 pm #63972
amycarolyn
ParticipantI’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.
August 31, 2013 at 10:54 pm #63973amycarolyn
ParticipantHere is the missing snippet.
$organizerlogo = get_field(‘organizer_logo’, $postId);
echo wp_get_attachment_image($organizerlogo, ‘meta-thumb’);September 3, 2013 at 2:32 pm #64350Kelly
ParticipantHi, 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.
September 4, 2013 at 8:55 pm #64613amycarolyn
ParticipantYour 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?
September 5, 2013 at 9:37 am #64721Kelly
ParticipantHi, 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!
September 16, 2013 at 8:41 pm #66236amycarolyn
ParticipantThanks, this helped me get the code working. Much appreciated!
September 17, 2013 at 7:21 am #66332Kelly
ParticipantI’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
July 7, 2015 at 6:27 am #980815Support Droid
KeymasterThis 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. -
AuthorPosts
- The topic ‘Function to get custom field from Organizer’ is closed to new replies.
