Support

Account

Home Forums Add-ons Repeater Field Need help wrapping a link around hero image banner Reply To: Need help wrapping a link around hero image banner

  • In your foreach loop you would simply retrieve the value of the URL field inside the repeater and add an anchor element, as the documentation describes in the section titled “foreach loop”, like so:

    
    foreach ($hero_banner_background_images as $i) {
    	$image = $i['hero_banner_background_image'];
    	$url = $i['hero_banner_url'];
    	…
    

    Forget the $hero_banner_url = get_field('hero_banner_url'); you have there previously, outside the loop.