PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Filter only parent category

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hello,

How I can filter only parent or only child category? I have cats like this:
- parent 1
-- child 1
-- child 2

I want display (filter) only products from"child 1".
Now I see products from"child 1" and"parent 1".

Its possible filter products from EXACT category ? Its very important form me... Please help. Thanks.

Hello

The filter will not show products if it does not have this child category. That is, if a product has only a parent category (without a child category) and you filter by child category, the plugin will not show this product

So how I can display (filter) only products from a parent category? For my, its not possible, because I see products from parent and childs categories...

Hello

only products from a parent category?  - Unfortunately there is no such possibility and it does not depend on the filter

If you filter by parent taxonomy, the filter will show products with child and parent taxonomies. If you filter by child category, the filter will show products with only child taxonomy. Search goes through taxonomy hierarchy

Its very simple solution. Can you update your next version plugin and can you add this (or similar) code?

function exclude_product_cat_children($wp_query) {
if ( isset ( $wp_query->query_vars['product_cat'] ) && $wp_query->is_main_query()) {
$wp_query->set('tax_query', array(
array (
'taxonomy' => 'product_cat',
'field' => 'slug',
'terms' => $wp_query->query_vars['product_cat'],
'include_children' => false
)
)
);
}
}
add_filter('pre_get_posts', 'exclude_product_cat_children');

Its form in front and backend. Maybe you can make some modification and EXACTLY option in bulk filters... ? It will my very nice and important function :)

 

Hello

Thank  you  for  cooperation!

Please  add  your  idea  here - https://bulk-editor.com/forum/  The developers will consider this and I think they will implement it in the next version