Created
October 19, 2016 18:18
-
-
Save GeoffEW/3f9b95956aba898947c67b2b197239dc to your computer and use it in GitHub Desktop.
Adds ticket header image to event
This file contains hidden or 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 | |
// Show the ticket header img | |
if ( ! isset( $ticket_header_img_rendered ) ) { | |
$img_id = Tribe__Tickets__Tickets_Handler::instance()->get_header_image_id( $ticket->get_event()->ID ); | |
$header_img = wp_get_attachment_image_src( $img_id, 'full' ); | |
if ( ! $header_img ) break; | |
echo "<img src='{$header_img[0]}' />"; | |
$ticket_header_img_rendered = true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment