Home › Forums › Add-ons › Gallery Field › Flexslider Insert from URL › Reply To: Flexslider Insert from URL
The following code is what works using the explode()
function. How is it possible to combine echo
for an unknown number of URLs?
<div id="slider" class="flexslider">
<ul class="slides">
<?php
$string = get_field( 'other' );
$split = explode ( '|', $string );
echo "<li><img src='{$split[0]}' /></li>";
echo "<li><img src='{$split[1]}' /></li>";
echo "<li><img src='{$split[2]}' /></li>";
echo "<li><img src='{$split[3]}' /></li>";
var_dump(the_field( 'other' ));
?>
</ul>
</div>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.