$tagID = $tag->term_id;
$thumbnail = z_taxonomy_image_url( (int)$object->object_id );
+
+ if (!$thumbnail) {
+ $thumbnail = get_template_directory_uri().'/assets/default-product-featured.png';
+ }
echo ' style="background-image: url('.$thumbnail.');padding:0;padding-bottom:20%;background-position:center center;background-size: cover;background-repeat:no-repeat;max-height: 370px; "';
<?php endif;?>
</div>
</div>
- <?php if (is_page(101)) {
- $terms = get_terms( 'product_tag' );
- $term_array = array();
-
- if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){ ?>
- <div class="row">
- <div id="tours-tags-grid-container">
- <ul id="tours-tags-grid">
- <?php foreach ( $terms as $term ) {
- $thumbnail = z_taxonomy_image_url( $term->term_id ); ?>
+ <?php if (is_page(101)) {
+ $terms = get_terms( 'product_tag' );
+ $term_array = array();
+
+ if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){ ?>
+ <div class="row">
+ <div id="tours-tags-grid-container">
+ <ul id="tours-tags-grid">
+ <?php foreach ( $terms as $term ) {
+ $thumbnail = z_taxonomy_image_url( $term->term_id ); ?>
<?php if( empty( $thumbnail ) ){
$thumbnail = get_template_directory_uri() . '/assets/header-images-2.jpg';
- }?>
- <li class="tour_tag"><div class="tag_image" style="height: 200px; width: 200px;background: url('<?php echo $thumbnail; ?> ') no-repeat center center;background-size: cover;"></div><a href=" <?php echo get_term_link($term->term_id); ?>"> <?php echo $term->name; ?> </a></li>
- <?php }
- }
- } ?>
- </ul>
- </div>
- </div>
+ }?>
+ <li class="tour_tag">
+ <div class="tag_image" style="height: 200px; width: 200px;background: url('<?php echo $thumbnail; ?> ') no-repeat center center;background-size: cover;">
+ </div>
+ <a href=" <?php echo get_term_link($term->term_id); ?>"> <?php echo $term->name; ?> </a>
+ </li>
+ <?php } ?>
+ </ul>
+ </div>
+ <?php } ?>
+ <?php } ?>
</div>
<?php get_footer(); ?>