<?php
$args = array(
'taxonomy' => 'product_cat',
'orderby' => 'name',
'order' => 'ASC',
'hide_empty' => true,
'slug' => array('bars-chain', 'logox-forestry-tool', 'alaskan-mill', 'first-cut', 'garden-eq', 'granberg-merchandise', 'safety-eq', 'sharpeners'),
);
$product_categories = get_terms($args);
if (!empty($product_categories) && !is_wp_error($product_categories)) :
echo '<div class="product-categories">';
echo '<ul>';
foreach ($product_categories as $category) :
$thumbnail_id = get_term_meta($category->term_id, 'thumbnail_id', true);
$image_url = wp_get_attachment_url($thumbnail_id);
echo '<li class="product-category">';
if ($image_url) {
echo '<a href="' . esc_url(get_term_link($category)) . '">';
echo '<img src="' . esc_url($image_url) . '" alt="' . esc_attr($category->name) . '">';
echo '</a>';
}
echo '<h4><a href="' . esc_url(get_term_link($category)) . '">' . esc_html($category->name) . '</a></h4>';
echo '<a class="brxe-button bricks-button bricks-background-primary" href="' . esc_url(get_term_link($category)) . '">';
echo 'Shop Now';
echo '</a>';
echo '</li>';
endforeach;
echo '</ul>';
echo '</div>';
else :
echo '<p>No product categories found.</p>';
endif;
?>