<?php
/**
 * The main template file
 *
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query.
 * E.g., it puts together the home page when no home.php file exists.
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package WordPress
 * @subpackage Twenty_Twenty_One
 * @since Twenty Twenty-One 1.0
 */
 ?>
<?php get_header(); ?>
<section class="programs">
  <div class="container">


            <div class="program-content-top">
                <h2 class="about-inner-main wow zoomIn">Blogs</h2>
                <?php
if ( function_exists( 'yoast_breadcrumb' ) ) {
yoast_breadcrumb( '<p id="breadcrumbs" class="text-center text-white wow zoomIn">','</p>' );
}
?>
            </div>
    
  </div>
</section>
<?php 
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
 
 
    // define query parameters based on attributes
    $options = array(
        'post_type' => 'post',
        'order' => 'desc',
        'orderby' => 'date',
        'posts_per_page' => 12, 
		'paged' => $paged,
    );
    $query = new WP_Query( $options );
    // run  the loop based on the query ?> 
    <section class="meet-Instructors">
  <div class="container">
            <div class="instructor-content-div row">
     <?php 
	$posts = 0;
	while ( $query->have_posts() ) : $query->the_post(); ?>	
	<div class="col-md-4 col-sm-12 mb-4 wow zoomIn">
                  <div class="founder-card-outer">
                      <div class="founder-image-div">
                         <a href="<?php echo get_permalink(); ?>"> <?php 
                                $feat_image = wp_get_attachment_url(get_post_thumbnail_id(get_the_id())); 
                                
                            ?>
                          <img class="w-100 founder-image" src="<?php  echo $feat_image; ?>" alt=""> </a>
                           </div>

                      <div class="founder-content-div">
                           <a href="<?php echo get_permalink(); ?>"><h4 class="founder-name"><?php the_title(); ?></h4></a>
                          <?php   $author = get_field('author'); 
                          if($author!=''){ ?>
                          <h6 class="auther-name"><svg xmlns="http://www.w3.org/2000/svg" class="me-2" height="1em" viewBox="0 0 448 512"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M224 256A128 128 0 1 1 224 0a128 128 0 1 1 0 256zM209.1 359.2l-18.6-31c-6.4-10.7 1.3-24.2 13.7-24.2H224h19.7c12.4 0 20.1 13.6 13.7 24.2l-18.6 31 33.4 123.9 36-146.9c2-8.1 9.8-13.4 17.9-11.3c70.1 17.6 121.9 81 121.9 156.4c0 17-13.8 30.7-30.7 30.7H285.5c-2.1 0-4-.4-5.8-1.1l.3 1.1H168l.3-1.1c-1.8 .7-3.8 1.1-5.8 1.1H30.7C13.8 512 0 498.2 0 481.3c0-75.5 51.9-138.9 121.9-156.4c8.1-2 15.9 3.3 17.9 11.3l36 146.9 33.4-123.9z"/></svg> <?php  echo $author; ?></h6>  
                          <?php } ?>
                          <p class="founder-pra"><?php the_excerpt(); ?></p>
                           <a href="<?php echo get_permalink(); ?>" class="btn_readmore">Read More</a>
                      </div>
                      </div>
                      </div>
	<?php   endwhile; ?>
	
 
		<?php 
	 echo '<div class="pagination">';
    echo paginate_links(array(
        'total' => $query->max_num_pages,
        'prev_text' => 'Previous',
        'next_text' => 'Next',
    ));
    echo '</div>';
     ?>
</div> 
   </div>           
</section> 
<?php
get_footer();
