Homepage › Forum › Product Support › Elektron › show the sub categories in the store
- This topic has 7 replies, 2 voices, and was last updated 7 years, 10 months ago by
tinhbeng.
-
AuthorPosts
-
7 years, 11 months ago #14111
Hi !
I want to show the sub categories in the store. What should I do?
Tanks.
7 years, 11 months ago #14129Hi,
Can you clarify this issue?
Currently, you are using the widget product filter with categories.
7 years, 11 months ago #14130Hi
Because I had the default widget with the Yoast plugin Conflict ( I mentioned in https://yolotheme.com/forums/topic/conflict-with-yoast-plugin ), I had to change the filter widget.
But I do not mean to show in the filter.
I would like sub-categories to be displayed under the title.Of course, if you fix the conflict problem, it will be very good. Followed by my own ticket.
Because I was in a hurry, and you took a long time, I went to another widget.Tanks
7 years, 11 months ago #14193Hi,
I have checked the conflict between Yoast Seo and YOLO widget as you describe.
You can go to the functions.php file (wp-content/plugins/yolo-elektron-framework/includes/functions.php) and do as this link: http://prntscr.com/i2kx52. Later, you can reload your site and check again.
Thanks.
7 years, 11 months ago #14215Hi,
Tank you, conflict fixed.
I would like sub-categories to be displayed under the title.
For example this link.
Subcategories are displayed with pictures.
Tanks
7 years, 11 months ago #14220Hi,
I would like sub-categories to be displayed under the title.
You can send me a screenshot where you want to display sub-categories.
Thanks.
7 years, 10 months ago #142437 years, 10 months ago #14266Hi,
- You go to Woocommerce -> Setting -> Product -> Display -> Default category display -> Select "Show Subcategories & products". After you select this option -> subcategories will display together product but the position isn't correct as you want. You will need to custom the archive-product.php file. (You need to do two things later: 1. Remove the position "subcategories" default. 2. Add to the position you want.)
- You need to use the Child Theme to custom for the archive-product.php.
1. Remove the position "subcategories" default: You remove this line: woocommerce_product_subcategories();
2. Add to the position you want: you can add this function to the functions.php of Child Theme:
add_action('yolo_before_archive_product','yolo_add_subcategories');
function yolo_add_subcategories(){
if(is_product_category() || is_product_tag()){?>
<?php woocommerce_product_subcategories();?>
<?php }
}?>
Hope it helps!.
-
AuthorPosts
You must be logged in and have valid license to reply to this topic.
