Skip Navigation

[Resolved] Displaying Term Fields on the Front-end

This support ticket is created 5 years, 1 month 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 4 replies, has 2 voices.

Last updated by Stina 5 years, 1 month ago.

Assisted by: Nigel.

Author
Posts
#1354031

I am trying to: Displaying Term Fields on the Front-end. I've created term fields for a category and it shows up nicely on the backend and I can add descriptions to the categories. Now I try to add it on the front end using Views. The term fields are nowhere to be found. Not under Fields and Views, no shortcode working.

Everything is up to date and I can't figure it out, please help!

hidden link

#1354043

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Stina

To display anything other than the taxonomy term titles assigned to a post (which you can with the wpv-post-taxonomy shortcode), you need to create a View to display term fields.

Create a new View at Toolset > Views and in the Content Selection choose Taxonomy and the relevant taxonomy.

That will return all of the terms belonging to that taxonomy, and you can output the fields you require, including term meta fields, via the Fields and Views button.

You presumably don't want to show all the terms, rather, just the terms assigned to a post.

So you need to add a Query Filter to that View that specifies which terms, which might be set by the page where the View is displayed (when inserting the View into the template for single posts) or the current post in the Loop (when inserting this View inside another View that outputs posts).

#1354843

What I try to accomplish is to have the descriptions under each category title in a custom search.
I can make a view, but then there are no checkboxes, or the descriptions are displayed under the titles.
I've tried both with the built-in description field and to make a custom one.
It would be great to be able to add more information to the search!
Thank you,
Stina

#1354965

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2019-10-03 at 14.33.25.png

Hi Stina

You mean you are displaying a custom search with a taxonomy filter (as checkboxes, presumably) and you want to display the description alongside each term, as shown very crudely in my screenshot?

Unfortunately it is not possible to customise the search filter controls, the output is in a fixed format and cannot be modified.

The only solution I can see is that you could ouput a block beneath the taxonomy filter checkboxes that displayed all of the descriptions in one place. Or you could simply edit the markup in the Search and Pagination section where the shortcode to display the filter controls is inserted to add some hard-coded text describing the terms.

#1354985

That was a pity. Well, we have to live with it ...
Thanks anyway!