Home › Forums › WoodMart support forum › Filters contents
Filters contents
- This topic has 10 replies, 2 voices, and was last updated 3 years, 8 months ago by
Aizaz Imtiaz Awan.
-
AuthorPosts
-
July 1, 2021 at 5:13 am #303787
[email protected]ParticipantHi, the filter content such as brands, other attributes, tag etc. are not visible when one goes from home page to category and then chose filter from mobile nav bar.
July 1, 2021 at 8:37 am #303855
Aizaz Imtiaz AwanKeymasterHello,
Please provide a video explaining the issue to check it myself and help you out accordingly.
Because your current explanation is not clear enough to understand what you require.
Best Regards
July 1, 2021 at 9:31 am #303873
[email protected]ParticipantHi since the video size is big here is an attempt to explain.
1. Reached at this category from homepage and pressed the filter button
2. The sidebar appears for categories
3. Emptied my cart and returned to shop( (though currently disabled to avoid the issue I am mentioning here)
4. Pressed filter in bottom nav bar
5. The side bar appears with attributes – brands, product type.Attachments:
You must be logged in to view attached files.July 1, 2021 at 9:33 am #303878
[email protected]ParticipantImage 5
Attachments:
You must be logged in to view attached files.July 1, 2021 at 12:03 pm #303928
Aizaz Imtiaz AwanKeymasterHello,
It seems that you have customized the categories pages to add the product tabs in there. Because by default the categories pages are not customizable in woocommerce.
Please try removing the customizations you made then check back.
Best Regards
July 1, 2021 at 5:23 pm #304014
[email protected]ParticipantHi the change I made in the category display was to show only the chosen subcategory products and not all the products of the patent category, e.g. after I have removed the change the new display shows milk products for category Milk/Alt subcategory and then the link home/shop/Dairy and Alternatives, then burger menu show side bar and finally all other products like butter etc of on the same page. How to avoid that?
July 2, 2021 at 10:53 am #304142
Aizaz Imtiaz AwanKeymasterHello,
From where did you make the categories to show only the subcategories products??
And your explanation is not clear enough to understand. Please elaborate with the help of some relevant screenshots.
Best Regards
July 9, 2021 at 12:46 am #305413
[email protected]ParticipantSurprisingly a long explaination given is missing, so hereis another try.
1. If user goes to Big Pantry, not only the subcategories but also all the 200+ products of the category show up in the subcategories page (image Page 1)
2. If then user goes to Subcategory Edible Oil and within that to sub-subcategory (e.g. GroundNut oil) then after sub-subcategories products, it shoows all 20+ products of subcategory Edible Oil as in Image 2.3. But if thesusb-subcategory Groundnut oil is reached directly from the Menu (instead of traversing through Big Pantry -> Edible Oils – > Grond Nut Oil – as in Image 3) then Only sub-sucatgory products are shown as in image 4
4. To avoid showing all such products and achieve a cleaner view like image 4, I added following in my child theme (reserached and picked from web as I am not techy, currently removed)
<?php
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’);5. When I add above code as mentioed in point 4 the filters of atrributes (brand, veg/Nveg) etc disappear when browsing as per point 1 and 2 but remain visible if browsing as per point 3.
I do not wish to show those additinal products in the bottom but also wish to show brands etc in filter, how to achive that?
Please do not say not possible after I have written sucha long explanation . 🙁
Attachments:
You must be logged in to view attached files.July 9, 2021 at 6:56 am #305514
Aizaz Imtiaz AwanKeymasterHello,
As you mentioned that the issue came after you added the code which clears that the issue is from the code you are trying to add not from our theme.
Sorry, but we could not help you with this beyond our limitations and support policy.
Best Regards.
July 9, 2021 at 7:27 am #305523
[email protected]ParticipantSo there is a no way you folks can stop additinal products being shown up and make filter visible as well correct?
July 9, 2021 at 10:17 am #305582
Aizaz Imtiaz AwanKeymasterHello,
Basically the products arrangement on the Shop page is controlled by woocommerce and our theme doesn’t influence.
Woocommerce provides a catalog option for the Shop page that you can find under Appearance >> Customize.
Screenshot for Clarification: https://gyazo.com/bc12d8da91620b3eed8652c28b02b009
You can try using them and see if they work for you otherwise there is no other option in Theme Settings available.
Regards.
Xtemos Studios -
AuthorPosts
- You must be logged in to create new topics. Login / Register