-<?php $args = array(
+<?php
+ $excluded_cat = get_term_by( 'slug', 'whitepapers', 'product_cat' );
+ $excluded_cat_id = $excluded_cat->term_id;
+ $args = array(
'orderby' => 'title',
'order' => 'ASC',
'hide_empty' => false,
- 'exclude' => '18'
-
+ 'exclude' => $excluded_cat_id
+
);
$product_categories = get_terms( 'product_cat', $args );
$count = count($product_categories);
$products = new WP_Query( $args );
if ($products->have_posts()) { ?>
<div class="category-container">
- <?php
+ <?php
echo '<div class="category-title">';
echo '<a href="' . get_term_link( $product_category ) . '">' . $product_category->name . '</a>';
echo '</div>';
</div>
<div class="block-row">
<div id="front-shop" class="block-column row small-up-1 medium-up-2 large-up-3" data-equalizer>
- <?php $args = array(
+ <?php
+ $excluded_cat = get_term_by( 'slug', 'whitepapers', 'product_cat' );
+ $excluded_cat_id = $excluded_cat->term_id;
+ $args = array(
'hide_empty' => false,
- 'exclude' => '18',
+ 'exclude' => $excluded_cat_id,
'orderby' => 'menu_order',
'order' => 'ASC',
);