types_render_termmeta on a Post Page with a given taxonomy
-
Hi Guys,
I would like to return a custom Term Field for a given taxonomy when on a Post Single page.eg. “Card A” Single page displaying all my custom post fields about that card. Card is in a taxonomy “Collection” > “Collection A”
Each Collection has custom Term fields (blurb, image, link) which I would like to display on my Single post page at the bottom.
if (have_posts()) { $count = 0; while (have_posts()) { the_post(); $count++; echo types_render_field("card-number", array("show_name"=>"false","output"=>"html","id"=>"$card-number")); echo '<h1>'. get_the_title() .'</h1>'; echo types_render_field("card-image", array("show_name"=>"false","output"=>"html","id"=>"$card-image","size"=>"large")); echo ''. the_content() .''; echo types_render_field("card-source", array("show_name"=>"false","output"=>"html","id"=>"$card-source","size"=>"large")); echo wp_strip_all_tags( get_the_term_list(get_the_ID(), 'source-archive', '', ' / ') ); echo types_render_termmeta("archive-blurb", array("term_id"=>"get_the_ID()","show_name"=>"false","output"=>"html","id"=>"$archive-blurb" )); echo types_render_termmeta("archive-logo", array("term_id"=>"get_the_ID()","show_name"=>"false","output"=>"html","id"=>"$archive-logo","size"=>"large" )); echo types_render_termmeta("archive-link", array("show_name"=>"false","output"=>"raw","id"=>"$archive-link")); } }
types_render_termmeta don’t display anything and I think it’s because it needs to know that ID of the taxonomy that the post is marked in.
I hope that makes sense. Any ideas what I should change?
Thanks
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘types_render_termmeta on a Post Page with a given taxonomy’ is closed to new replies.