Product category display in tabs
Helo sir, I need your help. I want to display product category into tabs. My product category is showing, but my tab content is not display according to tab category. I donn't know what is the problem Here my code: Trending Products
Clothing
?php if ('' !== $settings['show_filter'] ): ?
ul class=nav nav-tabs id=trendingTab role=tablist
?php
$terms = get_terms('product_cat');
foreach($terms as $term ){ ?
li class=nav-item role=presentation
a class=nav-link active id=accessories-tab data-toggle=tab href=?php echo $term-slug; ? role=tab aria-controls=accessories aria-selected=true?php echo $term-name; ?/a
/li
?php
}
?
/ul
?php endif; ?
/div
/div
?php
$args = new \WP_Query(array(
'post_type' = 'product',
));
?
div class=col-10
div class=tab-content tp-tab-content id=trendingTabContent
div class=tab-pane show active id=?php echo $term-slug; ? role=tabpanel aria-labelledby=accessories-tab
div class=trending-products-banner banner-animation
a href=shop-sidebar.htmlimg src=img/images/trending_banner.jpg alt=/a
/div
div class=row trending-product-active
?php
while ($wp_query - have_posts()) : $wp_query - the_post();
$termsArray = get_the_terms($post-ID, 'product_cat');
$termsSlug = ;
foreach($termsArray as $term){
$termsSlug .= $term-slug . '';
}
?
div class=col
div class=features-product-item
div class=features-product-thumb
!-- div class=discount-tag-20%/div --
a href=?php the_permalink(); ?
img src=?php the_post_thumbnail_url(); ? alt=
/a
div class=product-overlay-action
ul
lia href=cart.htmli class=far fa-heart/i/a/li
lia href=?php the_permalink(); ?i class=far fa-eye/i/a/li
/ul
/div
/div
div class=features-product-content
div class=rating
i class=far fa-star/i
i class=far fa-star/i
i class=far fa-star/i
i class=far fa-star/i
i class=far fa-star/i
/div
h5a href=?php the_permalink(); ??php the_title(); ?/a/h5
?php
global $woocommerce;
$currency = get_woocommerce_currency_symbol();
$price = get_post_meta( get_the_ID(), '_regular_price', true);
$sale = get_post_meta( get_the_ID(), '_sale_price', true);
?
?php if($sale) : ?
p class=pricedel?php echo $currency; echo $price; ?/del ?php echo $currency; echo $sale; ?/p
?php elseif($price) : ?
p class=price?php echo $currency; echo $price; ?/p
?php endif; ?
/div
div class=features-product-carta href=cart.htmladd to cart/a/div
/div
/div
?php endwhile; ?
/div
/div
/div
/div
/div
/section
Topic tabs categories Wordpress
Category Web