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!
📣 “ACF Chat Fridays”— Advanced Custom Fields (@wp_acf) January 31, 2023
The ACF team holds their first open office hours this Friday! Come and talk ACF, and ask questions about building sites with the plugin.
We’d love to see you there!
📆 Friday 3rd Feb - 3pm UTC
👉 Register here - https://t.co/3UtvQbE4CU pic.twitter.com/oTwW9K1XQ0
© 2023 Advanced Custom Fields.