This topic has 8 replies, 3 voices, and was last updated 7 years by Radu.

  • Author
  • #149783
     commonplaces
    Participant

    Hello,

    I build my webstite with your theme Kleo, adn with another plugin called toolest I added 2 new custom categories for my woocommerce product called “series” & “subejct”

    Could you tell me where i can find the template that manage the taxonomie-product_cat?

    i would like that the products, once they are called by one of the tems of these new categories could be display the same way as the native categories of the theme (like product_cat)

     

    so here native display of product :

    https://commonplaces-dev-commonplace_wpserver.pf3.wpserveur.net/shop

    and here the diplay for these new categories

    https://commonplaces-dev-commonplace_wpserver.pf3.wpserveur.net/subject/abstract

    I would like these in 3 colums like the shop.

    I asked toolset to do that, but they ask me to contact you because you know better than them how your  theme is build.

    Thanks for your help in advance.

    #149861
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! ?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #150000
     Radu
    Moderator

    Hi,

    product_cat comes from Woocommerce plugin : /wp-content/plugins/woocommerce/includes/widgets/class-wc-widget-product-categories.php line 138

    How did you have created shop categories? cuz creating categories from wp-admin -> Products -> Categories -> and those by default will look on three columns : https://seventhqueen.com/themes/kleo/product-category/clothing/hoodies/

    The woocommerce layout can be changed from wp-admin -> theme options -> woocommerce

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #150041
     commonplaces
    Participant

    Hi, it a bit more complicated than what you are explaining.

    I created with another plugin, customs product categories, and i would like them displaying like the native product catégories of the theme.

    Could you check the difference between these two pages

    NATIVE product cat : https://commonplaces-dev-commonplace_wpserver.pf3.wpserveur.net/product-category/ania-lemin/

    CUSTOMS product cat : https://commonplaces-dev-commonplace_wpserver.pf3.wpserveur.net/subject/abstract/

    So

    What is the name of the template that displays the shop page. how can I adopt that template to a custom taxonomy. So i want the cutoms categories displaying in 3 colums as the shop, as it is set in the theme settings.

    Could you tell me exactly where and how to get this?

    Thanks

    #150133
     Radu
    Moderator

    Hi,

    Try to add this function in your child theme functions.php

    COPY CODE
    
    function kleo_woo_body_classes_custom($classes = '') {
    	
    	if ( is_tax('subject') ) {
    		$classes[] = 'kleo-shop-cols-' . sq_option( 'woo_shop_columns', '3' );
    	}
    	
    	return $classes;
    	
    }
    add_filter('body_class','kleo_woo_body_classes_custom');
    

    Let me know if this will work and the custom taxonomy will have same layout as default woocommerce shop page

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #150137
     commonplaces
    Participant

    Great!!! Thanks a lot for the solution!

    May I ask you the code if there is two customs categories?

    Do i have to duplicated the function (that what’s i dis at the moment) but a way to say someting like

    if ( is_tax(‘subject’) ) OR ( is_tax(‘serie’) ) {…

    Could you help me to write the right code?

    Anyway thanks a lot already!

    #150142
     Radu
    Moderator

    You will have to use

    COPY CODE
    
    function kleo_woo_body_classes_custom($classes = '') {
    	
    	if ( is_tax('subject') || is_tax('serie') ) {
    		$classes[] = 'kleo-shop-cols-' . sq_option( 'woo_shop_columns', '3' );
    	}
    	
    	return $classes;
    	
    }
    add_filter('body_class','kleo_woo_body_classes_custom');
    

    || it’s equal with OR

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #150191
     commonplaces
    Participant

    Thanks a lot for you precious help!

    #150227
     Radu
    Moderator

    You’re welcome

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 9 posts - 1 through 9 (of 9 total)

The forum ‘Bugs & Issues’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?