How to change order of categories on product card?
-
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.
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
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.
Hello,
I am afraid it would not be possible.
If you have any questions please feel free to contact us.
Best Regards
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.
Hello,
Thank you for sharing your solution.
If you have any questions please feel free to contact us.
Best Regards
The topic ‘How to change order of categories on product card?’ is closed to new replies.