How to display a list of WC product as plain text with all attributes?
-
I am starting to learn about hooks and was wondering how I can make shortcode beside WC given shortcode, that returns a list of products (say a t-shirt with attributes size, color, style) of a t-shirt category only. And the format I am looking for is not default woocommerce [products] style. i want to be plain text like following:
XL, red, workout t-shirt
L, yellow, party t-shirt
XL, green, home t-shirt
XL, black, pattern t-shirt
I don’t want it to have pictures or thumbnail or anything I just need to know how to access these bit of info individually and concatinate them together to make the title, rather than saying $product –> $title I want to sayattribute <slug1 > + attribute <slug 2> + attribute <slug 2> + category (tshirt)
attribute <slug1 > + attribute <slug 2> + attribute <slug 2> + category (tshirt)
attribute <slug1 > + attribute <slug 2> + attribute <slug 2> + category (tshirt)
attribute <slug1 > + attribute <slug 2> + attribute <slug 2> + category (tshirt)
attribute <slug1 > + attribute <slug 2> + attribute <slug 2> + category (tshirt)All I don’t know is how to loop through all those items in that particular category.
All helps are appreciated in advance.
- The topic ‘How to display a list of WC product as plain text with all attributes?’ is closed to new replies.