Skip Navigation

[Resolved] Showing Term Fields on Taxonomy Archives

This support ticket is created 3 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Author
Posts
#2173963
Screenshot 2021-09-20 at 13.55.37.png
Screenshot 2021-09-20 at 13.55.26.png
Screenshot 2021-09-20 at 13.54.45.png

Hi,

I am stuck and looking for a bit of advice.

What I'm trying to achieve: I want to display custom fields on my taxonomy archives. So, each category has an image and then I display that on the corresponding category archive page. etc

So far, straightforward.

First, do I need to use Term Fields to do this? I assume so. That's what I have been using.

I have created Term Field Groups, assigned them to the relevant taxonomies, etc etc all good so far.

So now I want to display them on my taxonomy archive pages. I follow this tutorial:

https://toolset.com/documentation/user-guides/views/displaying-wordpress-term-fields/#displaying-term-fields-with-views-without-writing-any-code

However, when I come to make my archive pages, and I’m trying to insert them to the template I’m creating via the block editor, I can’t see them?

Any advice?

Thank.

#2174145

So, each category has an image and then I display that on the corresponding category archive page. etc...First, do I need to use Term Fields to do this? I assume so.
Hello, yes this sounds like a good use of term fields. Each category has a potentially different value for these custom fields, and you should be able to display these term field values in the corresponding term archive.

However, when I come to make my archive pages, and I’m trying to insert them to the template I’m creating via the block editor, I can’t see them?
Hi, term fields are unfortunately not currently integrated in the Block Editor. It is usually easiest to insert term fields into a Block-editor-based WordPress Archive using the Types termmeta shortcode. You can insert the Types termmeta shortcode in a paragraph block, or a Fields and Text block, or something similar. We have documentation for this shortcode available here:
https://toolset.com/documentation/customizing-sites-using-php/functions/
Click the orange "+ More" links shown with each field type to display examples of the termmeta shortcode for each field type, as well as different options available for the shortcode. In general, the format is like this:

[types termmeta="your-field-slug"][/types]

You would replace your-field-slug with the actual slug of your custom term field, and add any of the attributes necessary to format the field. For example, if you are displaying an image field, you will add the attributes like height, align, width, etc. as shown in this example:

[types termmeta="your-field-slug" alt="blue bird" title="Acme logo" class="my-class1 myclass2" style="border:1px solid black;padding:20px" size="thumbnail"][/types]

Let me know if you have questions about this and I'll give you some additional feedback.