<?php
/**
 * The Template for displaying all single Portfolio.
 *
 * @package advance-education-pro
 */
get_header(); 
get_template_part( 'template-parts/banner' );?>
<div class="container">
    <div class="row">
        <div id="construction_single" class="col-lg-9 col-md-12">
            <?php while ( have_posts() ) : the_post(); 
            $data = get_post_meta( $post->ID);?>
                <?php if ( has_post_thumbnail() ) { ?>
                    <div class="construction-image">
                        <img src="<?php the_post_thumbnail_url( 'full' ); ?>">
                    </div>
                <?php } ?>  
                <div class="post_info">
                    <p class="mt-3"><?php the_content();?></p>
                </div>  
                      <div class="meta-fields">
                            <?php if(get_post_meta($post->ID,'advance_education_pro_events_date',true)!= ''){ ?>
                            <div class="meta-class mb-3"><strong><?php _e('Date: ','advance-education-pro');?></strong> <?php echo esc_html(get_post_meta($post->ID,'advance_education_pro_events_date',true)); ?></div>
                            <?php }?>   
                            <?php if(get_post_meta($post->ID,'advance_education_pro_time',true)!= ''){ ?>
                            <div class="meta-class mb-3"><strong><?php _e('Time: ','advance-education-pro');?></strong> <?php echo esc_html(get_post_meta($post->ID,'advance_education_pro_time',true)); ?></div>
                            <?php }?>  
                            <?php if(get_post_meta($post->ID,'advance_education_pro_events_month',true)!= ''){ ?>
                            <div class="meta-class mb-3"><strong><?php _e('Month: ','advance-education-pro');?></strong> <?php echo esc_html(get_post_meta($post->ID,'advance_education_pro_events_month',true)); ?></div>
                            <?php }?>  
                            <?php if(get_post_meta($post->ID,'advance_education_pro_location',true)!= ''){ ?>
                            <div class="meta-class mb-3"><strong><?php _e('Location: ','advance-education-pro');?></strong> <?php echo esc_html(get_post_meta($post->ID,'advance_education_pro_location',true)); ?></div>
                            <?php }?> 
                            <?php if(get_post_meta($post->ID,'advance_education_pro_events_year',true)!= ''){ ?>
                            <div class="meta-class mb-3"><strong><?php _e('Year: ','advance-education-pro');?></strong> <?php echo esc_html(get_post_meta($post->ID,'advance_education_pro_events_year',true)); ?></div>
                            <?php }?> 
                            
                      </div>               
                <div class="clearfix"></div>
            <?php endwhile; // end of the loop. ?>
            <div class="post_pagination mt-4">
                <?php the_post_navigation( array(
                    'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'advance-education-pro' ) . '</span> ' .
                        '<span class="screen-reader-text">' . __( 'Next post:', 'advance-education-pro' ) . '</span> ' .
                        '<span class="post-title">%title</span>',
                    'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'advance-education-pro' ) . '</span> ' .
                        '<span class="screen-reader-text">' . __( 'Previous post:', 'advance-education-pro' ) . '</span> ' .
                        '<span class="post-title">%title</span>',
                ) );?>
            </div>
        </div>
        <div class="col-lg-3 col-md-12" id="sidebar">
            <?php dynamic_sidebar('sidebar-1'); ?>
        </div>  
    </div>    
    <div class="clearfix"></div>
</div>
<?php get_footer(); ?>