I have a wordpress website with woocommerce.
I have the need to link to the parent category. The use-case for this would be - if there is a product that is available in different sizes, show a link to the parent category so that they can "click here to view more".
My PHP is a little rusty to say the least, I'm mainly front-end, but here's what I need some code to do.
I'm hoping to place this within the product template file, or would it be best in functions.php? I'm not sure...
My best attempt at psuedo code:
If this product has a parent category
AND this parent category has more than one product in it
echo a link to that category with the text "Click here for more sizes"
Can anyone show me how to code that and where best to place it? I'm using the storefront theme.