<?php echo $__env->make('include/header_homemain', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>


<!-- Banner_start -->
<section class="innerBanner">
     <span class="r1" ></span>
          <span class="r1 r2" ></span>
          <span class="r1 r3" ></span>
          <span class="r1 r4" ></span>
          <span class="r1 r5" ></span>
          <span class="r1 r6" ></span>
          <span class="r1 r7" ></span>
          <span class="r1 r8" ></span>
          <span class="r1 r9" ></span>
          <span class="r1 r10" ></span>
      <div class="container">
        <div class="intro-content">
            <h2>News</h2>
            <nav aria-label="breadcrumb">
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="<?php echo e(url('/')); ?>">Home</a></li>
                <li class="breadcrumb-item active" aria-current="page">News</li>
            </ol>
            </nav>
        </div>
      </div>
<!--      <div class="bnrImgs" style="background:url(<?php echo e(url('assets/img/inner-banner.png')); ?>)"></div>-->
  </section>
<!-- Banner-end -->
<?php 
require($_SERVER["DOCUMENT_ROOT"]."/thinkwithmeddbot/wp-load.php"); 
$args = array(
	'numberposts' => 10,
	'orderby'          => 'date',
	'order'            => 'DESC',
	'post_type'        => 'post',
	'post_status'	   => 'publish'
);

$latest_posts = get_posts( $args );
?>
<style>
#viewer-foo{
	text-align:justify !important;
	text-justify: inter-word !important;
}

</style>
<section class="innerWraper services" style="background:#FFF;">
<div class="container">
    <h2 class="main_titles">Latest Posts</h2>
        
    <div class="news_outer row">
<?php
	foreach($latest_posts as $lpost)
	{
	
		$image_url = wp_get_attachment_image_src( get_post_thumbnail_id( $lpost->ID ), 'img-polaroid' );
		$post_url = get_site_url()."/".basename( get_permalink($lpost->ID) );
		//$post_content = $lpost->post_content;
		$post_title = $lpost->post_title;
		$post_author = get_the_author_meta('display_name', $lpost->post_author);
		$post_date = date('M d Y',strtotime($lpost->post_date));
		
		$post_content = substr($lpost->post_content, 0, 220);
   		$post_content = substr($post_content, 0, strrpos($post_content, ' '));
?> 
          <div class="col-lg-6 col-md-12">
            <div class="service-box" data-aos="zoom-in" style="min-height: 270px;">
              <div class="service-img"> <img src="<?php echo $image_url[0]; ?>" alt="news" style="height: 270px;"> </div>
              <div class="service-content">
                  <h3><?php echo $post_title; ?></h3>
                  <div class="fl--ex">
                      <span class="name"><i class="bi bi-person-circle"></i><?php echo $post_author; ?></span>
                      <span><i class="bi bi-calendar"></i><?php echo $post_date; ?></span>
                  </div>
                <p><?php echo $post_content; ?>...</p>
                <a href="<?php echo $post_url; ?>"  target="_blank"class="read-more blue-rs"><span>Read More</span> <i class="bi bi-arrow-right"></i></a>
              </div>
            </div>
          </div>
<?php 
	} 
?>			  
		  
    </div>
</div>
</section>
<?php echo $__env->make('include/footer_homeinner', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/meddbot/public_html/resources/views/news.blade.php ENDPATH**/ ?>