Skip Navigation

[Resolved] display taxonomy’s custom fields outside the loop

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user had a taxonomy view and wanted to display the custom field of that taxonomy outside of the view loop .

Solution:

You should be able to use the fields and views button in the loop editor for your category custom field.

Once you click this button then you can just search for your custom field and add it to the loop editor.

This support ticket is created 6 years, 9 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 replies, has 3 voices.

Last updated by YuliY2038 6 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#618429

Tell us what you are trying to do?
I'm trying to display taxonomy custom fields right after [wpv-layout-start]. I have created the custom fields for the featured image.

Is there any documentation that you are following?
I checked the shortcode list but couldn't find one that works outside the loop. I managed to use [wpv-archive-title] and [wpv-taxonomy-archive info="description"] to get taxonomy title and description.
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-view

Is there a similar example that we can see?

What is the link to your site?
hidden link

#618569

Hi Yuli,

- You can always pass parameters to a View

- For example, [wpv-view name="houses" taxid="1"]
- Such that:
==houses os the name of the view
==taxid is a parameter being passed to houses view
- You can use taxid to filter the results in houses view (In houses view settings especially in the Query filter section)

So, let's say that your main view name is "myview"
You need to create another view and name it for example "texview"
In myview, after [wpv-layout-start] , you can add the texview and pass the taxonomy ID (taxid) as a parameter like this [wpv-view name="taxview" taxid="1"]

In taxview, you can use the taxid parameter to filter the results.
Check this documentation page. it will guide you to use the parameter passed to a view: https://toolset.com/documentation/user-guides/passing-arguments-to-views/

I hope this can help you.

Thanks.

#618729

Not sure I understand.

I'm trying to display a custom field for a specific term on the taxonomy archive page.

My custom post type is Course, taxonomy is Course Category and the specific term is Marketing. I want to display the term's featured image (custom field). How should I do that?

#618785

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screen Shot 2018-02-22 at 1.59.23 PM.png

Hi Yuli,

Thank you for contacting our support forum.

You say that this on a custom archive correct?

Then you should be able to use the fields and views button in the loop editor for your category custom field.

Once you click this button then you can just search for your custom field and add it to the loop editor.

Please let me know if this helps.
Thanks,
Shane

#619065

Thanks! I checked that but I guess I missed it. It's working perfectly!