Home / Forums / WoodMart support forum / AJAX Products tabs only current category
Home › Forums › WoodMart support forum › AJAX Products tabs only current category
AJAX Products tabs only current category
- This topic has 7 replies, 2 voices, and was last updated 30 minutes ago by
Aizaz Imtiaz Awan.
-
AuthorPosts
-
December 11, 2025 at 12:14 pm #700471
dainius-4606ParticipantHello,
How can I get only current category in AJAX Products tabs without child categories? It shows with subcategories, I don’t need this. Screenshots attached.
AJAX Products tabs is in front page.Attachments:
You must be logged in to view attached files.December 11, 2025 at 3:38 pm #700547
Aizaz Imtiaz AwanKeymasterHello,
Currently, the Exclude option in the AJAX Products Tabs widget only allows you to exclude individual products by title or ID. It does not provide the ability to exclude entire subcategories, so all products from the current category and its child categories will still appear.
You can use the Exclude field to remove specific products if needed, but excluding child categories is not available in this widget: https://ibb.co/bMPRZNLY
Best Regards,
December 12, 2025 at 12:08 pm #700674
dainius-4606ParticipantHello, maybe there is any function to exclude child categories?
December 12, 2025 at 3:17 pm #700705
Aizaz Imtiaz AwanKeymasterHello,
Currently, the Exclude option in the AJAX Products Tabs widget only allows you to exclude individual products by title or ID. It does not provide the ability to exclude entire subcategories, so all products from the current category and its child categories will still appear.
You can use the Exclude field to remove specific products if needed, but excluding child categories is not available in this widget: https://ibb.co/bMPRZNLY
Best Regards,
December 15, 2025 at 4:17 pm #700986
dainius-4606ParticipantHello,
Maybe I can do like this function? But it doesn’t work with AJAX Products Tabs, I think there is some different query.
add_action( ‘woocommerce_product_query’, ‘bbloomer_hide_products_subcategory’, 9999 );
function bbloomer_hide_products_subcategory( $q ) {
if ( ! is_product_category() ) return;
$parent_id = get_queried_object_id();
$subcats = woocommerce_get_product_subcategories( $parent_id );
if ( empty( $subcats ) ) return;$tax_query = (array) $q->get( ‘tax_query’ );
$tax_query[] = array(
‘taxonomy’ => ‘product_cat’,
‘field’ => ‘slug’,
‘terms’ => array_column( $subcats, ‘slug’ ),
‘operator’ => ‘NOT IN’
);$q->set( ‘tax_query’, $tax_query, true );
}
December 16, 2025 at 9:46 am #701058
Aizaz Imtiaz AwanKeymasterHello,
Sorry to say, it requires customization and is beyond our support policy. Additional code customizations in theme files are out of our theme support scope.
Hope you can understand!
Best Regards,
December 16, 2025 at 11:58 am #701103
dainius-4606ParticipantThank you! Please close this topic.
December 16, 2025 at 2:35 pm #701125
Aizaz Imtiaz AwanKeymasterHello,
You’re Most Welcome!
Feel free to write back anytime. If you need further assistance, we are always here to help you.
If you have a minute, we’d truly appreciate your feedback — it helps us improve the product and shape future updates more effectively. We’d love your feedback on our theme: https://tally.so/r/w4l54k
Thanks for contacting us.
Have a great day.Topic Closed.
Best Regards. -
AuthorPosts
The topic ‘AJAX Products tabs only current category’ is closed to new replies.
- You must be logged in to create new topics. Login / Register