Hey zusammen,
folgendes Problem.
Ich benutze das Plugin advanced custom fields.
Dort habe ich Ein Wiederholungsfeld eingebunden um Icons + Beschreibung hinzuzufügen.
Allerdings habe ich nun das Problem, das die Icons die zum Beispiel beim Slide 1 sind auch beim Slide 2 angezeigt werden und darunter die anderen Icons (siehe Anhang)
Anhang 1 = Slide 1
Anhang 2 = Slide 2
hat jemand eine Idee woran das liegt?
Bei einem anderen Wiederholungsfeld klappt es ohne Probleme.
Mit folgenden Code hole ich die einzelnen URLS der Images:
ZitatPHP Alles anzeigen$cards = get_field('slides'); $icon_url = ""; $cards_html = ""; if ($cards) { foreach ($cards as $card) { if( $card['slide-popup-icons'] ): foreach( $card['slide-popup-icons'] as $image ): $icon_beschreibung = $image['icon_beschreibung']; $icon_url .= "<figure><img src=".$image['leistung_icon']." /> <figcaption>".$icon_beschreibung."</figcaption> </figure>"; endforeach; endif; $cards_html .= <div class="card-slider-popup-leistungen-icons"><hr> ' . $icon_url .' </div> }