Support

Account

Home Forums Front-end Issues wp_get_post_terms isnt returning ACF values

Unread

wp_get_post_terms isnt returning ACF values

  • Hello,

    I created a custom taxonomy, I added 2 ACF fields to it, in the back end everything works great. But in the front end I cannot fetch the ACF values.

    $context['bankingoptions'] = wp_get_post_terms($post->ID, 'review_banking', array());
    var_dump($context['bankingoptions']);
    

    Will display below, notice there are no ACF values

    /var/www/html/web/app/plugins/timber-library/vendor/twig/twig/src/Extension/DebugExtension.php:70:

    array (size=3)
      0 => 
        object(WP_Term)[2220]
          public 'term_id' => int 73
          public 'name' => string 'Bitcoin' (length=7)
          public 'slug' => string 'bitcoin' (length=7)
          public 'term_group' => int 0
          public 'term_taxonomy_id' => int 73
          public 'taxonomy' => string 'review_banking' (length=14)
          public 'description' => string '' (length=0)
          public 'parent' => int 0
          public 'count' => int 1
          public 'filter' => string 'raw' (length=3)
      1 => 
        object(WP_Term)[2222]
          public 'term_id' => int 74
          public 'name' => string 'Mastercard' (length=10)
          public 'slug' => string 'mastercard' (length=10)
          public 'term_group' => int 0
          public 'term_taxonomy_id' => int 74
          public 'taxonomy' => string 'review_banking' (length=14)
          public 'description' => string '' (length=0)
          public 'parent' => int 0
          public 'count' => int 1
          public 'filter' => string 'raw' (length=3)
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.