image esc_attr alt in repeater
-
Hi,
is it possible, that to get the alt-attribute from an image is not possible in a repeater?
In this example the alt-text is shown when outside the repeater, but not inside (same image chosen)
<div class="hero-slider"> <img src="<?php echo esc_url( $attributes['image-test']['url'] ); ?>" alt="<?php echo esc_attr( $attributes['image-test']['alt'] ); ?>"> <?php foreach( $attributes['slides'] as $inner ): ?> <div class="slide"> <img src="<?php echo esc_url( $inner['image']['url'] ); ?>" alt="<?php echo esc_attr( $inner['image']['alt'] ); ?>"> </div> <?php endforeach; ?> </div>
Regards
Claudia
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘image esc_attr alt in repeater’ is closed to new replies.