Last active
February 26, 2020 04:26
-
-
Save cliffordp/d442b6ef4b1ba5530d4c30dea0314b40 to your computer and use it in GitHub Desktop.
Events Calendar Pro: Photo View (v2 views): Insert venue details below event title.
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 | |
/** | |
* Events Calendar Pro: Photo View (v2 views): Insert venue details below event title. | |
* | |
* @link https://gist.github.com/cliffordp/d442b6ef4b1ba5530d4c30dea0314b40 This snippet. | |
* @link https://share.getcloudapp.com/9ZuAAEyB Screenshot. | |
* @link https://theeventscalendar.com/knowledgebase/k/using-template-filters-and-actions/ Helpful reference. | |
*/ | |
function cliff_photo_view_insert_venue_details() { | |
$address = tribe_get_venue_single_line_address( get_the_ID() ); | |
if ( empty( $address ) ) { | |
return; | |
} | |
printf( '<div class="tribe-common-b3">%s</div>', $address ); | |
} | |
add_action( 'tribe_template_after_include:events-pro/v2/photo/event/title', 'cliff_photo_view_insert_venue_details' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment