File: /home/dermova/public_html/me/wp-content/themes/dermoviva-en/taxonomy-solutions.php
<?php get_header(); ?>
<br class="breakline"/>
</div><!-- header -->
<div id="content">
<div class="mainholder01">
<div class="contentholder txtclrblack bgwhite">
<?PHP
if( is_tax() ) {
$term = $wp_query->get_queried_object();
$title = $term->name;
$descr = $term->description;
echo '<div class="breadcrumb"><a href="http://dermoviva.com/me">Home</a> > Solutions > '.$title.'</div>';
echo '<div class="contentcol03">
<p> </p><p> </p><h1 class="allcaps">'.$term->name.'</h1><p> </p>';
echo '<p>'.$term->description.'</p>';
echo '</div>';
echo '<div class="contentcol03">';
// QUERY IMAGE FIELD OF CATEGORY
$queried_object = get_queried_object();
$taxonomy = $queried_object->taxonomy;
$term_id = $queried_object->term_id;
$thumbnail = get_field('category_image', $taxonomy . '_' . $term_id);
// QUERY IMAGE FIELD OF CATEGORY
if(!empty($thumbnail)){
echo '<img src="'. $thumbnail .'" class="imgadapt" />';
} else {
echo '<p> </p>';
}
echo '</div><br class="breakline"/><p> </p>';
wp_reset_postdata();
echo '<h1 class="allcaps">'. $title . ' Solutions</h1><div class="productsholder">';
$cntr = 0;
if(have_posts()) : ?><?php while(have_posts()) : the_post();
echo '<div class="product">
<a href="'. get_permalink() .'">'. get_the_post_thumbnail().'</a>
<div class="producttitle allcaps">'. get_the_title() .'</div>
<a href="'. get_permalink() .'" class="productlink">View</a>
</div>';
$cntr++;
endwhile;
endif;
if($cntr <= 3) {
$addclass = 'only3';
} else {
$addclass = '';
}
echo '<span class="slider-arrows slider-arrow-left '.$addclass.'">left</span>
<span class="slider-arrows slider-arrow-right '.$addclass.'">right</span>
</div>';
}
?>
</div><!-- contentholder -->
</div><!-- maincontainer -->
</div><!-- content -->
<div id="pgscroller">
<span class="fa-stack fa-lg">
<i class="fa fa-circle-thin fa-stack-2x fa-5x" aria-hidden="true"></i>
<i class="fa fa-angle-down fa-stack-1x fa-2x" aria-hidden="true"></i>
</span>
</div>
<?php get_footer(); ?>
<!-- TAXONOMY SOLUTIONS -->