Support

Account

Home Forums Front-end Issues ACF Data not visible from loop Reply To: ACF Data not visible from loop

  • Okay so something like this?

      <?php if( have_rows('links') ): ?>
          <?php 
           $links = get_sub_field('links');
          foreach ($links as $link) :
            $anchor = ($link['id']) ? 'href="#' . $link['id'] . '"' : "";
          ?>
            <li class="side-menu__item"> 
              
            <a class="menu__link" <?= $anchor ?>>
                <?= $link['title']; ?>
              </a>
            </li>
          <?php endforeach ?>
          <?php endif; ?>