Problem:
The user is building a theme and would like to display some term fields inside the single post template file.
Solution:
Use similar code to this one to get the values of the terms:
$taxonomy_slug = "book-author"; $authors = get_the_terms( get_the_ID(), $taxonomy_slug ); $author_ids = wp_list_pluck( $authors, 'term_id' ); foreach ($author_ids as $author_id) { echo types_render_termmeta("foto-del-autor", array( "term_id" => $author_id, "width" => "100", "height" => "100" ) ); }
Update the first line with your taxonomy slug.
Relevant Documentation:
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 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - | - | 9: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: Africa/Casablanca (GMT+01:00)
This topic contains 5 replies, has 3 voices.
Last updated by 4 years, 2 months ago.
Assisted by: Jamal.