Home Forums General Issues acf if query problem Reply To: acf if query problem

  • edit: I’ve got it, that the individual boxes of the colors are displayed. However, these are now empty …. do we have to work with an array here?

    $colors = get_field('farben');
    if( $colors ): ?>
        <?php foreach( $colors as $color ): ?>
            <div style="float: left; width: 10px; height: 10px; margin-right: 3px; border: 1px solid #000000; background-colo:-<?php echo $color['value']; ?>"></div>
        <?php endforeach; ?>
    <?php endif; ?>