the answer for all question about Oxygen Builder plugin and WordPress

FIXED


FIXED

My head is broken af…

Why this not work in repeater? I am trying to display posts from all categories. By the specific category, (each post have one only) I want to display custom ACF term field.

In repeaters code block:

ID, ‘category’);
$term = $terms[0]; //take only 1st ID
$value = get_field(‘ikona’, ‘category_’.$term->term_id);
?>

I do not even get the $term value if I try to echo it…

What I do wrong?

SOLVED:

term_id);
?>


Source

5 Comments
  1. Aleš Sýkora says

    even if I try:

    $id = get_the_id();
    echo $id; // WORKS
    $terms = wp_get_object_terms($id, ‘category’); //WHY THIS SHIT DOESNOT WORK??
    $term = $terms[0];
    print_r($terms); //RETURN EMPTY ARRAY
    $value = get_field(‘ikona’, ‘category_’.$term->term_id);
    echo $value;
    echo get_field(‘ikona’, ‘category_1’);

  2. Aleš Sýkora says

    changing to get_the_terms doesnt help too.

  3. Jaka Minkuž says
  4. Aleš Sýkora says

    Solved

    term_id);
    ?>

  5. Taiwo D. Dare says

    Thanks for sharing

Leave A Reply

Your email address will not be published.

Oxyrealm Docs