Last active
October 13, 2016 15:17
-
-
Save andrasguseo/3396c6dba948d789e2937857beff7b47 to your computer and use it in GitHub Desktop.
For Tamara - show venue image and organizer image on single event page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* The Events Calendar Pro | |
* Show venue image and organizer image on single event page | |
* Paste the below in your child theme's functions.php file | |
* | |
* For $size you can use: thumb, medium, large, full | |
* For $link you can use: true or false; links to the event page. | |
*/ | |
function add_venue_image_to_single_event_page() { | |
$size = 'thumb'; | |
$link = false; | |
$venue_id = tribe_get_venue_id(); | |
echo tribe_event_featured_image( $venue_id, $size, $link ); | |
} | |
add_action ('tribe_events_single_meta_venue_section_end', 'add_venue_image_to_single_event_page'); | |
function add_organizer_image_to_single_event_page() { | |
$size = 'thumb'; | |
$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'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment