Home › Forums › General Issues › Relationship Code Problem › Reply To: Relationship Code Problem
Hi,
yes when I remove the code it would load perfect.
I have tested it with the “twentythirteen” standard Theme and there the following code doesn’t work too.
<?php $posts = get_field('myfieldname');
if( $posts ): ?>
<?php foreach( $posts as $p): ?>
<?php echo get_the_title( $p->ID ); ?>
<?php endforeach; ?>
<?php endif; ?>
I have also asked the Developer of the theme I normaly use but has also no idea what is going wrong there. But with the theme there is no error because with the standardtheme it also doesn’t work.
Have you got any idea what can be done? Can I send you the website via private message that you can take a look what is going wrong there.
Thank you for your help.
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!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.