Tell us what you are trying to do?
I'm using Woocomerce and I made a product archive template to list products in categories. I've created an image type custom field in the product category taxonomy and I can't display it using any shortcode method. I saw a post from a few years ago saying that I would need to create a custom shortcode for this and there was some code to it, which I added to functions.php, but nothing happened.
It would be an enormous help if someone could lay out a detailed set of instructions on how to achieve this.
Is there any documentation that you are following?
No docs for this.
Is there a similar example that we can see?
Couldn't find any
What is the link to your site?
Hello,
In the taxonomy archive page, you can get current term ID with shortcode [wpv-taxonomy-id]. and you can use it as Types shortcode attribute "term_id", like this:
[types termmeta="my-image" term_id="[wpv-taxonomy-id]"][/types]
More help:
https://toolset.com/documentation/customizing-sites-using-php/functions/#image
term_id:
"id" - output the field for the term with this id.
My issue is resolved now. Thank you!
Hi and thanks for your quick help, eventhough that didn't work for me, lol
This is how I managed to display the image, within a Gutenberg HTML block:
<img src="[wpv-taxonomy-field name='wpcf-my-custom-field-image']">
I'm totally new to Toolset and I'm a nocoder (only HTML/CSS), and I see great possibilities with your framework.
Be prepared for lots more questions 🙂