File: /var/www/panigaletech.com/wp-content/themes/panigale/taxonomy-industry.php
<?php
get_header(); ?>
<?php
$term_slug = get_query_var( 'industry' );
$taxonomyName = get_query_var( 'industry' );
$termOject = get_term_by( 'slug', $term_slug, 'industry' );
// echo"<pre>";
// print_r($termOject);
// echo"</pre>";
?>
<!--FInd Talent-->
<section class="inner-section mb-3">
<div class="container-fluid">
<div class="row">
<div class="col-lg-8 col-md-10 col-sm-12 offset-lg-2 offset-md-1 text-center mb-5">
<h2 class="heading02 font-weight-7 mb-2 wow fadeInUp" data-wow-duration="2s"><?php echo $termOject->name; ?></h2>
<p class=" wow fadeInUp" data-wow-duration="2s"><?php echo $termOject->description; ?></p>
</div>
<div class="col-lg-10 offset-lg-1 mt-5">
<div class="row">
<?php include 'template-parts/find-talent_filter.php';?>
<div class="col-lg-9 col-md-7 col-sm-7">
<div class="result-blog mb-4 clearfix wow fadeInUp" data-wow-duration="2s">
<div class="result"><?php echo $termOject->count; ?> Results</div>
<div class="short-by">
<div class="form-group">
<label for="staticEmail" class="col-form-label">Sort by </label>
<select class="form-control" name="sort_by" id="sort_by">
<option value=""></option>
<option value="date" <?php if($search_sort_by == 'date'){ echo 'selected="selected"';}?>>Date added</option>
<option value="title" <?php if($search_sort_by == 'title'){ echo 'selected="selected"';}?>>Title</option>
</select>
</div>
</div>
</div>
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
'post_type' => 'candidates',
'posts_per_page' => 999,
'paged' => $paged,
'tax_query' => array(
array(
'taxonomy' => 'industry',
'field' => 'slug',
'terms' => $termOject->slug
)
)
);
$query = new WP_Query( $args );
if(count($query->posts)>0)
{
?>
<div class="row findtalent-post">
<?php
foreach($query->posts as $types)
{
?>
<!--Blog 1-->
<div class="col-lg-4 col-md-12">
<div class="card wow fadeInUp" data-wow-duration="2s">
<a href="<?php echo get_permalink($types->ID); ?>"><?php echo $types->post_title; ?></a>
<p><i class="fas fa-map-marker-alt"></i><?php echo get_field( "city", $types->ID ) ?></p>
<p><i class="fas fa-tag"></i><?php echo string_part($termOject->name, 70); ?></p>
</div>
</div>
<?php } ?>
</div>
<?php } else { ?>
<div class="row findtalent-post">
<h2>No Candidates Found</h2>
</div>
<?php } ?>
</div>
<div class="col-sm-12">
<div class="find-call-bg" style="background-image: url('<?php echo get_bloginfo('template_directory');?>/img/find.jpg');">
<div class="find-call-blue-bg wow fadeInRight" data-wow-duration="2s">
<h5 class="heading05 text-white text-uppercase text-left mb-3">FOR MORE INFORMATION ABOUT OUR AVAILABLE TALENT, CONTACT:</h5>
<a href="tel:<?php echo get_option('phone_no');?>" class="pr-5 text-white"><i class="fas fa-mobile-alt"></i> <?php echo get_option('phone_no');?></a>
<a href="mailto:<?php echo get_option('contact_email');?>" class="text-white"><i class="fas fa-envelope"></i> <?php echo get_option('contact_email');?></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!--FInd Talent-->
<?php get_footer(); ?>
<script type="text/javascript">
$(document).ready(function() {
$("#apply_filter").click(function() {
$("#frm_talent_search").submit();
});
$("#sort_by").change(function() {
$("#search_sort_by").val($("#sort_by").val());
$("#frm_talent_search").submit();
});
});
</script>