Home Forums Front-end Issues Taxonomy dont returning values for fields


Taxonomy dont returning values for fields

  • I’m assigned a custom fieldtype to some taxonomy terms.
    When the taxnomy is checked on post panel the fields are visible and I can fill the input fields.
    They saved the data normally.

    On front end when I do

    $campos = get_the_terms($post->ID, 'grupos-de-campos');
    $campo = array_pop($campos);

    I can see the Taxonomy selected

    //the return on front end
    object(stdClass)#2489 (10) {
      string(2) "10"
      string(10) "Estande 03"
      string(10) "estande-03"
      string(1) "0"
      string(2) "10"
      string(16) "grupos-de-campos"
      string(0) ""
      string(1) "0"
      string(1) "1"
      string(2) "95"

    But when I try retrieve data from that fields ACF return false.

    $custom_field = get_field( 'anuncio_pavilhao', 'grupos-de-campos_' . $campo->term_id );
    //the return on front end

    Any solution for this?

    • Elliot

    • September 21, 2013 at 2:37 pm

    Hi @felipeandrada

    Thanks for the code snippets. Your code looks perfect so it must be 1 of 2 things:

    1. You have a spelling mistake in your field_name ‘anuncio_pavilhao’
    2. that you are using get_field in your functions.php file which at the moment ACF is not able to run correctly in.

    Are either of these possible?


Viewing 2 posts - 1 through 2 (of 2 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.