<?php
/**
 *Template Name: coursess Template
 *
 * 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.

 */
get_header();?>
				<div class="big-title">
					<div class="container">
						<h1 class="entry-title">Courses</h1>
						<div class="breadcrumb">
							<div class="container">
								<ul class="tm_bread_crumb">
									<li class="top"><a href="<?php echo home_url();?>">Home</a></li>
									<li class="sub tail current">Courses</li>
								</ul>
							</div>
						</div>
					</div>
				</div>
				<div class="main">
					<div class="container">
						<div class="row">
							<div class="mb-3 projects_btn" style="text-align: center;margin-top: 50px;width: 100%;">
									<p>High School (HS) </p></div>
							<div class="news-content">
								<ul class="news-grid mb-3">
									<?php
query_posts( array( 'numberposts' => -1,  'post_type' => 'courses', 'category_name' => 'hs' ) );
  //the loop start here
  if ( have_posts() ) : while ( have_posts() ) : the_post();
?> 
									<li class="col-md-4 col-sm-6 mb-3" style="list-style: none;">
										<div class="news-entry-media">
											<a href="<?php the_permalink();?>"><img src="<?php echo the_field('image'); ?>" alt="" /></a>
											<div class="news-entry-cover">
												<div class="news-overlay home-blog-container"></div>
												
											</div>
										</div>
										<div class="home-blog-content">
											<div class="home-blog-title">
												<a href="<?php the_permalink();?>">
													<?php the_title(); ?>
												</a>
											</div>
											
											<div class="home-blog-desc">
											<?php $content = get_the_content();
 
echo mb_strimwidth($content, 0, 150, '...');?>									
											</div>
											
										</div>
									</li>
									<?php  endwhile; endif; wp_reset_query(); ?>
									
								</ul>
								
							</div>
						</div>
						<div class="row">
							<div class="mb-3 projects_btn" style="text-align: center;margin-top: 50px;width: 100%;">
									<p>Higher Secondary School (HSS) </p></div>
							<div class="news-content">
								<ul class="news-grid mb-3">
									<?php
query_posts( array( 'numberposts' => -1,  'post_type' => 'courses', 'category_name' => 'hss' ) );
  //the loop start here
  if ( have_posts() ) : while ( have_posts() ) : the_post();
?> 
									<li class="col-md-4 col-sm-6 mb-3" style="list-style: none;">
										<div class="news-entry-media">
											<a href="<?php the_permalink();?>"><img src="<?php echo the_field('image'); ?>" alt="" /></a>
											<div class="news-entry-cover">
												<div class="news-overlay home-blog-container"></div>
												
											</div>
										</div>
										<div class="home-blog-content">
											<div class="home-blog-title">
												<a href="<?php the_permalink();?>">
													<?php the_title(); ?>
												</a>
											</div>
											
											<div class="home-blog-desc">
											<?php $content = get_the_content();
 
echo mb_strimwidth($content, 0, 150, '...');?>									
											</div>
											
										</div>
									</li>
									<?php  endwhile; endif; wp_reset_query(); ?>
									
								</ul>
								
							</div>
						</div>
					</div>
				</div>
				</div>
			</div>
				<?php get_footer();?>