Home Forums General Issues ACF link value only shows when I preview the page


ACF link value only shows when I preview the page

  • So a bit of a weird one.
    I am using ACF link inside a repeater. I have checked my field names and it all seems in order.


    When I preview the page, the link shows. But it does not show on the public page??

    Any ideas of where I should be looking to resolve?

    <?php if(get_sub_field('button_link_blocks') && get_sub_field('button_text_blocks')): ?>
    <div class="blk-bttn">
     <a href="<?php the_sub_field('button_link_blocks'); ?>">
       <?php the_sub_field('button_text_blocks'); ?>
    <?php endif; ?>

    I have updated the page, so the values are committed (they show if I exit the page and re-enter)

    I have removed the if statement (button div and button text work)

    The html output looks like so:
    <div class="blk-bttn"><a href="">test</a></div>

  • Deleted the page and rebuilt.

    All seems to work fine now. Odd.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.