Is there a way to add descriptions for tags?

Solved
stephdumais
Tourist
7 1 0

One thing I enjoyed about my previous Woocommerce setup is that I could display some information about tags. As it stands, clicking on a product tag brings us to a listing of all products with the chosen tag but I would like to include a text above the list. Adding the text in the template is the easy part, but what would be the best way to manage the tags themselves to add descriptions to them? I haven't found any apps dealing with this in the app market.

0 Likes
Guleria
Shopify Partner
1255 263 345

This is an accepted solution.

Hello @stephdumais ,

I'm not sure you are aware about the liquid or not but for your requirement I can  just share the idea rest you have to code it.
So basic idea is:
Create a settings in theme settings named it 'Tags description" or related as you want.
In the settings pass the 'key' (tag name) and value ( tag description )
e.g.
Men: Men tag description here;
Women: Women tag description here;
and so on...

Now in collection template first get the settings  (Tags description) split them 
Now with a if condition if settings contain the current tag. If yes display the description of the specific tag.

Thanks


Want to modify or custom changes on store hire me.
Email: guleriathakur43@gmail.com, Skype: navrocks1
If helpful then please Like and Accept Solution.
If you are happy and want to donate Click here (Its my paypal)
stephdumais
Tourist
7 1 0

Thank you, I wasn't aware I could add custom settings! This is great

So if I add new tags when I create a product, I will have access to those tags in the new theme setting as well?

0 Likes
Guleria
Shopify Partner
1255 263 345

Yes but every time when you add a new tag for a product you have to add it in settings too with description.

Want to modify or custom changes on store hire me.
Email: guleriathakur43@gmail.com, Skype: navrocks1
If helpful then please Like and Accept Solution.
If you are happy and want to donate Click here (Its my paypal)
0 Likes
stephdumais
Tourist
7 1 0

Ok I understand what you mean now. Thank you!

0 Likes