Problem when there are more than 1 organizer
-
Hi
I wanted to display the featured image and the content for the organizer on the single event page, and not only the name and details. This I managed to to with these functions added to my function.php in my child theme:
function add_organizer_image_to_single_event_page() {
$size = 'medium';
$link = false;
$organizer_id = tribe_get_organizer_id();
echo tribe_event_featured_image( $organizer_id, $size, $link );
}
add_action ('tribe_events_single_meta_organizer_section_end', 'add_organizer_image_to_single_event_page');
function add_organizer_content_to_single_event_page() {
$organizer_id = get_post( $organizer_id );
echo apply_filters(
'the_content',
get_post_field( 'post_content', tribe_get_organizer_id() ));
}
add_action ('tribe_events_single_meta_organizer_section_end', 'add_organizer_content_to_single_event_page');This works and looks good when I only have one (1) organizer, here are two examples of that (organizer info at the top of the content, just below the title area):
https://tt.sinkadus.com/adventure/expedition/expedition-patagonien-med-emma-svensson/
https://tt.sinkadus.com/adventure/expedition/vinterexpedition-sylarna/But when there are two (2) organizers, my functions only produce the image and content for the first one, below the names of the two organizers in question. So if anyone knows what to change in the functions, to have them work for multiple organizers, that would be awesome.
Thanks!
The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.