-
-
Save anonymous/b636aa5713109a639b9e to your computer and use it in GitHub Desktop.
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 | |
/** | |
* List View Single Event | |
* This file contains one event in the list view | |
* | |
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/list/single-event.php | |
* | |
* @package TribeEventsCalendar | |
* | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
die( '-1' ); | |
} | |
// Setup an array of venue details for use later in the template | |
$venue_details = tribe_get_venue_details(); | |
// Venue | |
$has_venue_address = ( ! empty( $venue_details['address'] ) ) ? ' location' : ''; | |
// Organizer | |
$organizer = tribe_get_organizer(); | |
// Get event link | |
$event_link = esc_url( tribe_get_event_link($id) ); | |
// Get specific custom fields | |
$fields = tribe_get_custom_fields(); | |
$event_type = $fields["Event Type"]; | |
$additional_type = $fields["Event Type Additional"]; | |
$additional_type_link = get_field( "additional_field_for_event_type" ); | |
$event_affiliation = $fields["EtM Program Affiliation"]; | |
$event_artists = $fields["Artists"]; | |
$event_cost_additional = $fields["Event Cost Additional"]; | |
$event_cost_additional_link = get_field( "additional_text_for_event_cost" ); | |
$rsvp_link = get_field("rsvp_link"); | |
?> | |
<!-- Event Title --> | |
<?php do_action( 'tribe_events_before_the_event_title' ) ?> | |
<?php the_title( '<h1 class="tribe-events-single-event-title">', '</h1>' ); ?> | |
<?php do_action( 'tribe_events_after_the_event_title' ) ?> | |
<div class="event-type-single"> | |
<span><?php echo $event_type; ?></span> | |
<div><?php echo $additional_type . ' ' . $additional_type_link; ?></div> | |
</div> | |
<div class="event-date-single"> | |
<p><?php echo tribe_get_start_date(); ?></p> | |
</div> | |
<?php if ( $venue_details ) : ?> | |
<!-- Venue Display Info --> | |
<div class="event-address-single"> | |
<span><?php echo tribe_get_venue(); ?></span> | |
<div><?php echo tribe_get_address() . ' ' . tribe_get_city() . ', ' . tribe_get_state() . ' ' . tribe_get_zip() . ' ' . tribe_get_map_link_html(); ?></div> | |
</div> <!-- .tribe-events-venue-details --> | |
<?php endif; ?> | |
<!-- Event Cost --> | |
<div class="event-cost-single"> | |
<?php if ( tribe_get_cost( null, true ) ) : ?> | |
<div class="tribe-events-event-cost"> | |
<span class="event-cost-text"><?php echo tribe_get_cost( ); ?></span> | |
<?php if ( $rsvp_link ) : ?> | |
<span class="event-rsvp-link"><a href="<?php echo $rsvp_link; ?>"><img src ="http://etm.staging.wpengine.com/wp-content/uploads/2016/02/rsvp-button.png" class="rsvp-button"/></a> <img src="http://etm.staging.wpengine.com/wp-content/uploads/2016/02/powered-by-eventbrite.png" class="powered-by-eventbrite"/></span> | |
<?php endif; ?> | |
<div><?php echo $event_cost_additional . ' ' . $event_cost_additional_link; ?></div> | |
</div> | |
<?php endif; ?> | |
</div> | |
<?php echo tribe_event_featured_image( null, 'large', false ) ?> | |
<div class="artists"><p><em><?php echo $event_artists; ?></em></p></div> | |
<!-- Event Content --> | |
<?php do_action( 'tribe_events_before_the_content' ) ?> | |
<div class="tribe-events-list-event-description tribe-events-content"> | |
<?php echo the_content(); ?> | |
</div> | |
<!-- .tribe-events-list-event-description --> | |
<?php | |
do_action( 'tribe_events_after_the_content' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment