<div class="container content">
<div class="row">
<div class="col-md-4">
<div class="list-group">
<a href="{% url 'products:productsList' %}"
class="list-group-item {% if not category %}selected{% endif %}">Все</a>
{% for c in categories %}
<a href="{{ c.get_absolute_url }}"
class="list-group-item {% if category.id == c.id %}selected{% endif %}">{{ c.name }}</a>
{% endfor %}
</div>
</div>>
<div class="col-md-8 products">
<div class="row">
{% for product in products %}
<div class="col-sm-4">
<div class="product">
<div class="product-img">
<img src="{% if product.image %}{{ product.image.url }}{% else %}{% endif %}" alt="">
</div>
<p class="product-title">
<a href="{{ product.get_absolute_url }}">{{ product.title }}</a>
</p>
<p class="product-price">{{ product.price }} руб.</p>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
apply_filters( 'woocommerce_order_item_name', $item->get_name() . '<span class="custom-weight">' . $item->get_weight(). '<span> ', $item, false ) ;
function slojnost_has_products($slojnost, $category){
$args = array(
'post_type' => 'product',
'post_status' => 'publish',
'tax_query' => array(
array(
'taxonomy' => 'pa_slojnost',
'terms' => $slojnost,
'field' => 'slug',
'operator' => 'IN'
),
array(
'taxonomy' => 'product_cat',
'terms' => $category,
'field' => 'id',
'operator' => 'IN'
),
)
);
$have_products = false;
$filter_slojnost = new WP_Query($args);
if ( $filter_slojnost->have_posts() ) $have_products = true;
return $have_products;
}
С первого раза плохо визуализировал верстку ))))