Support

Account

Home Forums Front-end Issues Link field not working Reply To: Link field not working

  • OK, forget the “if” statement for now and don’t use the “esc_url”.

    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 :/

    Hope this helps