Skip to content

Instantly share code, notes, and snippets.

@cliffordp
Last active February 26, 2020 04:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cliffordp/d442b6ef4b1ba5530d4c30dea0314b40 to your computer and use it in GitHub Desktop.
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.
<?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