Tell us what you are trying to do?
Show a taxonomy term field in a view.
Is there any documentation that you are following?
https://toolset.com/documentation/user-guides/custom-content/displaying-wordpress-term-fields/
Is there a similar example that we can see?
-
What is the link to your site?
hidden link
Nigel
Supporter
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/London (GMT+00:00)
To output taxonomy term custom fields you need a View that queries the taxonomy.
In the first release of Blocks only post Views are supported, not taxonomy (nor user) Views.
So you would need to create such a View using classic Views editor.
If you installed Blocks, the classic editor is disabled by default, but you can go to Toolset > Settings and change this under Editing experience.
Hi Nigel,
Thanks for the reply. I think I'll be okay now. 🙂
Rens
For some reason my view of the taxonomy is nog showing properly. When I try to select it it gives me this error:
"Error while retrieving the View preview. The selected View (ID: undefined) was not found."
When I try to add the view to a static page with Elementor Pro it works fine.
Any clue what I'm doing wrong?
Nigel
Supporter
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/London (GMT+00:00)
Actually, you are not doing anything wrong, that's a known issue that will be addressed in a subsequent update.
For now, as a workaround, you can insert the View using a block that accepts shortcodes, such as the Custom HTML block.
But you will need to manually type the wpv-view shortcode, there is no "Field and Views" button available in that situation.
What's the name of your View?
The shortcode would be something like this:
[wpv-view name="my-taxonomy-view"]
Can you try that?
Thanks, that works. One more thing, how do now get only the image of the taxonomy of the current item in the loop? Now I have all the taxonomy images showing up for each item in the loop.
Here's the code for my taxonomy view:
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
[types termmeta='categorie-afbeelding' title='%%TITLE%%' alt='%%ALT%%' size='medium' resize='proportional'][/types]
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
[/wpv-no-items-found]
[wpv-layout-end]
Nigel
Supporter
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/London (GMT+00:00)
You need to add a Query Filter to your taxonomy View where the term is set by the current post in the Loop (the text may be different, could refer to the parent View, if it is not clear ask and I will double-check).
Yep, I got it now!
Still trying to get a hang of the plugin but appreciate the support from you guys.
Cheers,
Rens