Forums › Forums › Search & Filter Pro › How to exclude some categories from widget result ?
Tagged: categories, Elementor, exclude, product, woocommerce
- This topic has 13 replies, 2 voices, and was last updated 4 years, 7 months ago by Anonymous.
-
Anonymous(Private) March 11, 2020 at 12:07 pm #236256
Hello,
I’ve a post widget that show woocommerce product and that, to can work, need to have before this script inserted in a text widget :
[searchandfilter id=”5236″ action=”filter_next_query”]
<script>(function ( $ ) {
“use strict”;
$(document).on(“sf:ajaxfinish”, “.searchandfilter”, function(){
elementorFrontend.hooks.doAction(‘frontend/element_ready/posts.cards’,
jQuery(‘.elementor-widget-posts’));
});
}(jQuery));</script>now in the post widget under this script i’ve all the products but i need that on this wodget mus be shown only the categories taht i’ce set on the search form and not all.
in the widget post , related to wuery section. has set the posrt source so i can not select the correct categories to be sxcluded.
How can i reach this reasult?Thank You
Anonymous(Private) March 11, 2020 at 1:13 pm #236284Hello Trevor,
The tabs refering to post and not to produtc so when i try to search them on the elementor widget post they are not present because isee only the post categorie and not the product categories.
On the search form it is correct but i need that in the widget post under the search form i do ont see all products but only that included on the search.
Thank YouAnonymous(Private) March 11, 2020 at 1:23 pm #236286The form work perfectly but it is the widget post under the form on that i can no t manage the product categories being that the widget is realted to post and not to product.
Do you remembre that we have used the post widgt with taht code in a widget text to can be used to receive the query result ?Anonymous(Private) March 12, 2020 at 4:03 pm #236523Very Nice,
I’ve used in the first time but after i’ve removed all and nwo i’ve better understood what is that section.
There is a little problem about the exclusion because if i exclude teh category it exclude also all the other categories that hai inside the specific category and form me this is not ok.F.E. if i exclude PIZZE TONDE i only want that the speicfic singel categry must not be shown and not the products with PIZZE TONDE and MOZZARELLA and POMODORO and etc etc
I’ve been fairly clear in my explain ?
I’d need only that in widget post under the search form i do not see the CATEGORY and not all product related to categry AND other category
-
AuthorPosts