Your IP : 216.73.216.95


Current Path : /var/www/ooareogundevinitiative/wp-content/themes/pain/tribe-events/
Upload File :
Current File : /var/www/ooareogundevinitiative/wp-content/themes/pain/tribe-events/single-event.php

<?php
/**
 * Single Event Template
 * A single event. This displays the event title, description, meta, and
 * optionally, the Google map for the event.
 *
 * Override this template in your own theme by creating a file at [your-theme]/tribe-events/single-event.php
 *
 * @package TribeEventsCalendar
 *
 */

if ( ! defined( 'ABSPATH' ) ) {
	die( '-1' );
}

$events_label_singular = tribe_get_event_label_singular();
$events_label_plural = tribe_get_event_label_plural();
$event_id = get_the_ID();
$cost = tribe_get_cost( null, true );
            
if($cost) {
            
$cost = 'Cost: '.$cost;
            
} else {
            
$cost = 'Free for Everyone';
            
}
?>
<div class="main-content jw-blog-article">
	<div class="row">
		<div class="container"> 
			<div class="col-md-9">
				<div class="tb-event-signle">
					<?php while ( have_posts() ) :  the_post(); ?>
						<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
							<?php echo tribe_event_featured_image( $event_id, 'jwstheme_custom_blog_single_size', false ); ?>
							<div class="tb-event-info">
								<div class="header-info">
                                <div class="content-box-header">
                                    <div class="jw-btn-bd-main fee-event"><i class="fa fa-check" aria-hidden="true"></i><?php echo esc_html($cost);?></div>
									<h2 class="title">
										<?php the_title(); ?>
									</h2>
                                    <div class="jw-location-info">
					                   <?php if ( tribe_address_exists() ) echo sprintf( '<div class="jw-location"><i class="fa fa-map-marker"></i> %s</div>', tribe_get_full_address()); ?>
				                    </div>
                                    <div class="content-bottom">
                                    <ul class="jw-meta">
    									<li class="jws-author"><?php echo __('By ', 'pain').'<span>'.get_the_author().'</span>'; ?></li>
                                        <?php $date_format = get_the_date(); ?>
                                        <?php $date_format_col = strtotime($date_format); ?>
                                        <li class="jws-date"><?php echo date( 'd M o', $date_format_col )?></li>
                                        <li class="time"><?php echo tribe_get_start_time() . ' To ' . tribe_get_end_time() ?></li>								
    								</ul>
                                    <div class="icon-event">
                                    <a href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>"><i class="fa fa-facebook"></i></a>
                                    <a href="http://twitter.com/share?url=<?php the_permalink(); ?>"><i class="fa fa-twitter"></i></a>
                                    <a href="https://www.pinterest.com/pin/create/button/?url=<?php the_permalink(); ?>"><i class="fa fa-pinterest"></i></a>
                                    </div>
                                    </div>
                                    </div>
									<div class="jw-content">
										<?php the_content(); ?>
									</div>
                                    <div class="tag-meta">
                                    <span class="title-tag">POST TAGS:</span>
                                    <ul>
                                <?php
                                    $custom_post_tags = get_the_tags();
                                    if ( $custom_post_tags ) {
                                        foreach( $custom_post_tags as $tag ) {
                                            $tags_arr[] = $tag -> name;
                                        }
                                    }
                                    if( isset($tags_arr)) {
                                        $uniq_tags_arr = array_unique( $tags_arr );
                                     foreach( $uniq_tags_arr as $tag ) {
                                         // LIST ALL THE TAGS FOR DESIRED POST TYPE
                                         $sanitizeTag =  sanitize_title($tag);
                                         $tag_link = get_term_by('name', $tag, 'post_tag');
                                         echo '<li><a href="'. get_tag_link($tag_link->term_id).'">' .$tag. '</a></li>';
                                         }
                                     }else{
                                        echo "<span>"."Not Tags"."</span>";
                                     }
                                 ?>
                                </ul>
                                </div>
								</div>
							</div>
						</div> <!-- #post-x -->
						<?php if ( get_post_type() == Tribe__Events__Main::POSTTYPE && tribe_get_option( 'showComments', false ) ) comments_template() ?>
					<?php endwhile; ?>
				</div>
			</div>
			<div class="col-md-3">
				<div class="sidebar-right">
					<?php if (is_active_sidebar('jwstheme-right-sidebar')) { dynamic_sidebar( 'jwstheme-right-sidebar' ); } else { dynamic_sidebar('jwstheme-main-sidebar'); } ?>
				</div>
			</div>
		</div>
	</div>
</div>