Skip Navigation

[Resolved] Display field value of a taxonomy

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

Problem:
How to display taxonomy term custom field using PHP

Solution:
To display the Types field using PHP, you can display it by using Types PHP API function types_render_termmeta()

You can find proposed solution, in this case, with the following reply:
=> https://toolset.com/forums/topic/display-field-value-of-a-taxonomy/#post-871172

Relevant Documentation:
https://toolset.com/documentation/user-guides/displaying-wordpress-term-fields/#displaying-term-fields-with-types-api

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

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 6 years, 8 months ago.

Assisted by: Minesh.

Author
Posts
#871106

I need to display a field in my theme that I created in the taxonomy.

How to accomplish this with php?

I wanted to include in another plugin too, how to accomplish this?

#871172

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - To display the Types field using PHP, you can display it by using Types PHP API function <Strong> types_render_termmeta() .

For example:

<?php echo types_render_termmeta( "term-field-slug-name", array( "argument1"=>"value1", "argument2"=>"value2" ) ); ?>

Where:
- Replace the field slug and arguments accordingly.

More info:
=> https://toolset.com/documentation/user-guides/displaying-wordpress-term-fields/#displaying-term-fields-with-types-api
=> https://toolset.com/documentation/user-guides/displaying-wordpress-term-fields/#displaying-a-field-for-a-specific-taxonomy-term
=> https://toolset.com/documentation/customizing-sites-using-php/functions/