mage-eventpress/templates/single-events.php

83 lines
2.8 KiB
PHP

<?php
get_header();
the_post();
global $post;
global $woocommerce;
$event_meta = get_post_custom(get_the_id());
$author_terms = get_the_terms(get_the_id(), 'mep_org');
$book_count = get_post_meta(get_the_id(),'total_booking', true);
if($book_count){ $total_book = $book_count; }else{ $total_book = 0; }
?>
<div class="mep-events-wrapper">
<div class="mep-event-detailsss">
<div class="mep-top-part">
<div class="mep-left-col">
<div class="mep-event-thumbnail">
<?php the_post_thumbnail('full'); ?>
</div>
</div>
<div class="mep-right-col">
<div class="mep-event-title-header">
<h2><?php the_title(); ?></h2>
<?php if($author_terms){ ?><p> <?php _e('By:','mep'); ?> <a href="<?php echo get_term_link( $author_terms[0]->term_id, 'mep_org' ); ?>"><?php echo $author_terms[0]->name; ?></a></p><?php } ?>
<?php
if($event_meta['_price'][0]>0){
if($event_meta['mep_price_label'][0]){
?>
<h3><?php echo $event_meta['mep_price_label'][0]; ?>: </h3>
<?php } echo get_woocommerce_currency_symbol().$event_meta['_price'][0]; ?>
<?php } else{ _e('<h3>Free</h3>','mep'); }?>
<?php if($event_meta['mep_total_seat'][0]){
?>
<h5><strong><?php _e('Total Seat:','mep'); ?></strong> <?php echo $event_meta['mep_total_seat'][0]; ?> (<strong><?php echo ($event_meta['mep_total_seat'][0]- $total_book); ?></strong> Left)</h5>
<?php } ?>
</div>
</div>
</div>
<div class="mep-btn-part">
<div class="mep-left-col">
<div class="mep-event-meta">
<?php _e('Share This Event:','mep'); ?> <?php mep_social_share(); ?>
</div>
</div>
<div class="mep-right-col">
<div class="mep-event-datetime">
<h3><?php _e('Date and Time:','mep'); ?></h3>
<p><?php echo $event_meta['mep_event_start_date'][0]; ?> - <?php echo $event_meta['mep_event_end_date'][0]; ?></p>
</div>
</div>
</div>
<div class="mep-content-part">
<div class="mep-left-col">
<div class="mep-event-details">
<h3 class="mep-desc-title"><?php _e('Description','mep'); ?></h3>
<?php the_content(); ?>
</div>
</div>
<div class="mep-right-col">
<div class="mep-reg-btn-sec">
<?php
if($event_meta['_price'][0]>0){
?>
<div class="cart-btn-sec">
<?php mep_get_event_reg_btn(get_the_id()); ?>
</div>
<?php }?>
</div>
<div class="mep-event-location">
<h3><?php _e('Event Location:','mep'); ?></h3>
<p><?php echo $event_meta['mep_location_venue'][0]; ?><br/>
<?php echo $event_meta['mep_street'][0]; ?><br/>
<?php echo $event_meta['mep_city'][0]; ?><br/>
<?php echo $event_meta['mep_state'][0]; ?>,
<?php echo $event_meta['mep_postcode'][0]; ?><br/>
<?php echo $event_meta['mep_country'][0]; ?></p>
</div>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>