I can not show custom field in my theme.
I set Color picker field on “Edit Category”. But it could not show my theme.
I can set another field on post and page , and can call them to my theme , but can not do in “Edit Category” page.
I use Advanced Custom Fields 4.2.2, on WordPress 3.6(Japanese).
Hi @bissy
So you are having issues loading the data?
Have you read this guide:
http://www.advancedcustomfields.com/resources/how-to/how-to-get-values-from-a-taxonomy-term/
What code are you currently using? On what template file?
Hi @elliot !
I use code below, I want to use the_field(‘color’) in “Edit Category”.
<span class="categorys font-s" style="background-color:<?php the_field('color'); ?>"><?php the_category(' ') ?></span>
It’s in single.php and index.php , and other fields are working fine.
Hi @bissy
Thanks for the clarification. So you are looking at a post (single.php) and trying to load the color of the connected category?
This is covered in the following tutorial:
http://www.advancedcustomfields.com/resources/how-to/how-to-get-values-from-a-taxonomy-term/
You will find an example showing how to get the connect term data too
Thanks
E
@elliot ,
I tried this -> “Finding the term related to the current post” ,
And I was able to finally!
Thank you!!