HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux vmi1674223.contaboserver.net 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC 2024 x86_64
User: root (0)
PHP: 7.4.3-4ubuntu2.22
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/ruby/wp-content/themes/echooling/single-rt-events.php
<?php

/**
 * The template for displaying all single posts
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
 *
 */
get_header(); 
global $echooling_option; 
?>  
<!-- Event Detail Start -->  
<div class="reactheme-courses-details">
	<?php while ( have_posts() ) : the_post();
      	//take metafield value
		$ev_start_date = get_post_meta(  get_the_ID(), 'ev_start_date', true );
		$ev_end_date   = get_post_meta(  get_the_ID(), 'ev_end_date', true );
		$ev_start_time = get_post_meta(  get_the_ID(), 'ev_start_time', true );
		$ev_end_time   = get_post_meta(  get_the_ID(), 'ev_end_time', true );
		$ev_location   = get_post_meta ( get_the_ID(), 'ev_location', true);
		$ev_link       = get_post_meta ( get_the_ID(), 'ev_link', true);
		$ev_price      = get_post_meta ( get_the_ID(), 'ev_price', true);
		$ev_speaker    = get_post_meta ( get_the_ID(), 'ev_speaker', true);
		$ev_book_slot  = get_post_meta ( get_the_ID(), 'ev_book_slot', true);
		$ev_slot       = get_post_meta ( get_the_ID(), 'ev_slot', true);
		$ev_phone      = get_post_meta ( get_the_ID(), 'ev_phone', true);

		$new_sDate = date("d/m/Y", strtotime($ev_start_date));  
		$new_eDate = date("d/m/Y", strtotime($ev_end_date));


		$new_sDate = date("d/m/Y", strtotime($ev_start_date));  

		$date_style = $echooling_option['date_style'];

		if( 'style2' == $date_style ){
			$ev_start_date = $new_sDate;
			$ev_end_date = $new_eDate;
		}


		$time_style = $echooling_option['time_style'];

		$new_stime  = date("H:i", strtotime($ev_start_time));
		$new_etime  = date("H:i", strtotime($ev_end_time));

		if( 'style2' == $time_style ){
			$ev_start_time = $new_stime;
			$ev_end_time   = $new_etime;
		}

	?>
      	<div class="row">
	        <div class="col-lg-8 col-md-12">
	          	<div class="event-desc">        
		        	<?php
			            the_content( sprintf(
			              wp_kses(
			                /* translators: %s: Name of current post. Only visible to screen readers */
			                __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'echooling' ),
			                array(
			                  'span' => array(
			                    'class' => array(),
			                  ),
			                )
			              ),
			              get_the_title()
			            ) );

			            wp_link_pages( array(
			              'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'echooling' ),
			              'after'  => '</div>',
			            ) );
		          	?>
		     
				    
	      		</div>
	        </div>
	        <div class="col-lg-4 col-md-12">
	        	<div class="rt-events-sidebar">
		         	<div class="course-features-info">		         		
			            <ul>
			            	<?php if(!empty($ev_price)): ?>
				                <li class="lectures-feature">
				                    <i class="far fa-credit-card"></i>
				                    <span class="label"><?php esc_html_e('Cost:', 'echooling');?></span>
				                    <span class="value price"><?php echo esc_attr($ev_price);?></span>
				                </li>
				            <?php endif; ?>    
			               
			                <?php if(!empty($ev_speaker)): ?>
				                <li class="lectures-feature">
				                    <i class="far fa-user"></i>
				                    <span class="label"><?php esc_html_e('Speaker:', 'echooling');?></span>
				                    <span class="value"><?php echo esc_attr($ev_speaker);?></span>
				                </li>
				            <?php endif; ?> 

				            <?php if(!empty($ev_slot)): ?>
				                <li class="lectures-feature">
				                    <i class="fas fa-user-friends"></i>
				                    <span class="label"><?php  esc_html_e('Total Slot', 'echooling');?></span>
				                    <span class="value"><?php echo esc_attr($ev_slot);?></span>
				                </li>
				            <?php endif; ?>

				            <?php if(!empty($ev_book_slot)): ?>
				                <li class="lectures-feature">
				                    <i class="fas fa-lock"></i>
				                    <span class="label"><?php  esc_html_e('Booked Slot', 'echooling');?></span>
				                    <span class="value"><?php echo esc_attr($ev_book_slot);?></span>
				                </li>
				            <?php endif; ?> 
				            
			            </ul>

			            <?php if(!empty($echooling_option['event_btn'])): ?>
			            <div class="book-btn">
								
			            	<a href="<?php echo esc_url($ev_link);?>"><?php echo esc_attr($echooling_option['event_btn']);?> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg></a>
			            	
			            </div>
			            <?php endif; ?>

	   				</div>
	   				<div class="course-features-info box-2">
	         		
		            <ul>
		            	<?php if(!empty($ev_start_date)): ?>
			                <li class="lectures-feature">			                   
			                    <span class="label"><?php esc_html_e('Date', 'echooling');?></span>
			                    <span class="value"><?php echo esc_attr($ev_start_date);?> - <?php echo esc_attr($ev_end_date);?></span>
			                </li>
			            <?php endif; ?>    
		               
		                <?php if(!empty($ev_start_time)): ?>
			                <li class="lectures-feature">			                 
			                    <span class="label"><?php esc_html_e('Time', 'echooling');?></span>
			                    <span class="value"><?php echo esc_attr($ev_start_time);?> - <?php echo esc_attr($ev_end_time);?></span>
			                </li>
			            <?php endif; ?>	    

			           

			            <?php if(!empty($ev_location)): ?>
			                <li class="lectures-feature">			                   
			                    <span class="label"><?php esc_html_e('Vanue', 'echooling');?></span>
			                    <span class="value"><?php echo esc_attr($ev_location);?></span>
			                </li>
			            <?php endif; ?> 	
			            <?php if(!empty($ev_phone)): ?>
			                <li class="lectures-feature">			                   
			                    <span class="label"><?php esc_html_e('Phone', 'echooling');?></span>
			                    <span class="value"><?php echo esc_attr($ev_phone);?></span>
			                </li>
			            <?php endif; ?> 	               
		                   
		            </ul>	           

   				</div>
   				</div>
      		</div>
      	</div>	     	      
      
  <?php endwhile; ?>
  
</div>
<!-- Event Detail End -->
<?php
get_footer();