Home › Forums › General Issues › link array: url works but page title doesn't show › Reply To: link array: url works but page title doesn't show
I’m using a repeater field and this worked for me:
<?php if( have_rows('lista_de_encuestas') ) : while ( have_rows('lista_de_encuestas') ) : the_row(); ?>
<?php
$pollUrls = get_sub_field('enlace_a_encuesta');
?>
<li>
<a href="<?php echo $pollUrls['url']; ?>"><?php echo $pollUrls['title']; ?></a>
</li>
<?php endwhile; endif; ?>
Not sure if the if statement has something to do with it. I tried the same thing over and over and for some reason when I deleted everything and did it over again it worked. I triple checked the code before and I don’t think I had any typos or errors but… who knows :/
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!
Plugin boilerplates can do some of the heavy lifting during initial development. We look at four options to speed up your plugin creation. https://t.co/ZtMsdBxAHw
— Advanced Custom Fields (@wp_acf) June 5, 2023
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.