Home New Guten Forums WoodMart support forum How to change order of categories on product card?

How to change order of categories on product card?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #400006

    bhare1985
    Participant

    See:

    How do you change what order, or better yet, what categories display here?
    Likewise, it seems that whatever category is first in this order also determines which link is displayed when clicking on the image. Hopefully, there is some filter or tweak that can change what category is dominant and what order to display when there are multiple.

    #400038

    Hello,

    Unfortunately, there is no option to change the order in the product grid.

    If you have any questions please feel free to contact us.

    Best Regards

    #400053

    bhare1985
    Participant

    There is no way at all with filters or other technical solutions? I understand woodmart doesn’t expose it in the UI but I am surprised the listing of these categories don’t use a built-in filter and/or use a custom filter I could hook into.

    #400288

    Hello,

    I am afraid it would not be possible.

    If you have any questions please feel free to contact us.

    Best Regards

    #400499

    bhare1985
    Participant

    For those who are looking for a technical explanation on how do this:

    The function that creates the list of categories is woodmart_product_categories() in wp-content\themes\woodmart\inc\integrations\woocommerce\template-tags.php

    Woodmart checks for the existence of this function, so you can override this function by creating a new .php file in wp-content/mu-plugins/ that redefines it.

    E.g.
    wp-content/mu-plugins/woodmart-template-tags-override.php >>

    
    <?php
    if ( ! function_exists( 'woodmart_product_categories' ) ) {
        function woodmart_product_categories() {
            print "It works!";
        }
    }
    ?>
    
    • This reply was modified 2 years, 11 months ago by bhare1985.
    #400544

    Hello,

    Thank you for sharing your solution.

    If you have any questions please feel free to contact us.

    Best Regards

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

The topic ‘How to change order of categories on product card?’ is closed to new replies.