Support

Account

Home Forums Front-end Issues Color picker set in "Edit Category" don't show in front-end.

Solved

Color picker set in "Edit Category" don't show in front-end.

    • bissy

    • September 10, 2013 at 2:10 pm

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

    • Elliot

    • September 10, 2013 at 3:40 pm

    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?

    • bissy

    • September 10, 2013 at 3:47 pm

    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.

    • Elliot

    • September 10, 2013 at 3:59 pm

    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

    • bissy

    • September 10, 2013 at 4:24 pm

    @elliot ,

    I tried this -> “Finding the term related to the current post” ,
    And I was able to finally!

    Thank you!!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.