Home Forums WoodMart support forum Show product category next to title first Main Category ?

Show product category next to title first Main Category ?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #265743

    webfirtinasi
    Participant

    Hello I need a lot of help. Show product category next to title In the section, while examining the products, he made an alphabetical order. While the main category should have been first and then a sub-category, it was first sub-category then main category due to the alphabetical order. Can you help me what I need to do to fix this problem. I want to tell you as an example.

    https://ibb.co/Lt850h8

    Attachments:
    You must be logged in to view attached files.
    #265815

    Artem Temos
    Keymaster

    Hello,

    We are using core WooCommerce function to display categories list on the shop page called wc_get_product_category_list(). According to their documentation, this function doesn’t allow us to sort categories displayed according to the algorithm you are asking for. Sorry, but we are not able to change this in our theme.

    Kind Regards

    #266958

    webfirtinasi
    Participant

    So how can I change it.WooCommerce function

    function wc_get_product_category_list( $product_id, $sep = ‘, ‘, $before = ”, $after = ” ) {
    return get_the_term_list( $product_id, ‘product_cat’, $before, $sep, $after );

    #266963

    addy
    Participant

    This is a much-needed feature. We should have the option to display 1,2 or as many categories as we want. Personally, I want to display only one category on the product title no matter how many categories product has been marked in backend.

    Examples:
    1) https://www.icanvas.com/canvas-art-prints/style/abstract?product=canvas&sort=popular
    2) https://www.greatbigcanvas.com/category/wildlife/

    You will notice product title has only one category being displayed -“canvas Print”. See screenshot.

    However, the same products are also in many other categories like “wildlife, abstract” etc but they are not displayed. This helps to have a clean and branded look.

    Attachments:
    You must be logged in to view attached files.
    #267203

    Artem Temos
    Keymaster

    Hello,

    We will try to improve this functionality in our next theme update. Sorry, but we don’t have a workaround for this at the moment.

    Kind Regards

Viewing 5 posts - 1 through 5 (of 5 total)