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; ?>
Not working,
so the problem seems to be that this page is my wordpress Posts page. Which makes it not get the data from ACF. how can i fix this ?
The data gets through on none posts pages
To clarify:
The data isnt showing. Actually it is not recieving the data at all.
<?php
$title = get_field('title');
?>
<?php var_dump($title); ?>
gives me NULL