I am trying to make an acf repeater field with the link field. I don't understand why I get an error message: "Warning: ltrim() expects parameter 1 to be string, array given in"
Here is my code
``
<?php if($assos):?>
<?php foreach ($assos as $asso):
$web = $asso ['title_fields_two'] ?>
<span>
<a href="<?php echo esc_url($web);?>">
<?php echo "$web";?>
</a>
</span>
<?php endforeach; endif?>``
$web
is not a string but an array.esc_url()
usesltrim()
on the value you pass to it. You'll have to check with ACF support for more on this; third-party plugin support is off topic here.