Skip Navigation

[Resolved] Displaying custom term fields on post using Avada

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.

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
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)

This topic contains 3 replies, has 2 voices.

Last updated by Christian Cox 6 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#599433
Screen Shot 2017-12-15 at 2.14.47 PM.png

I have added a custom taxonomy "communities" that I select when adding a "quick move-in" home. Using the term fields, I added custom fields to the taxonomy group that I would like to display on a post (aka "Community Logo", "Community Address"). I have no problem calling in the the taxonomy name and description, but am unable to call the custom term fields. Is this possible?

hidden link

Screenshot shows mock-up of what I am trying to achieve and link shows where I'm at.

Thanks,

#599615

This is not possible, unfortunately.

The Term Fields can be displayed only on Term Archives and Views listing those terms: https://toolset.com/documentation/user-guides/displaying-wordpress-term-fields/

To display the Term Fields on the single post, you need to create a Taxonomy View and query the Taxonomy you used for this post type and the field's.

Then, in the Taxonomy View Query Filter you will choose "Set by the current post" and in the Loop you will output the Taxonomy Term Fields.

Then, you will insert this View in a content template, that you can then apply to the single Posts of your usage.

This will then show a list of terms fields added to this single post.

#599633

https://toolset.com/forums/topic/display-term-fields-in-archiv-other-than-term-archive-oder-term-view/

Would it be possible by creating custom shortcodes as discussed in the above discussion? and if so, could you give me an example of the how the PHP code would look that I would need to add?

Thanks,

#600028

Since there is a way to accomplish this with nested Views as described above, I recommend using that approach. If you want to create your own custom shortcodes to accomplish this, you can check out WordPress documentation for wp_get_object_terms and get_term_meta for some examples, and you can implement the shortcode I provided in the other ticket if you'd like:
https://codex.wordpress.org/Function_Reference/wp_get_object_terms/
https://developer.wordpress.org/reference/functions/get_term_meta/

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.