Home › Forums › General Issues › Article Relationship › Reply To: Article Relationship
Hi,
yes I take a look there. I allready testet it with this code.
But it doesn’t work.
<?php if(get_field('news-kategorie')) { ?>
<h2>News</h2>
<?php $posts = get_field('news-kategorie');
if( $posts ): ?>
<?php foreach( $posts as $post): // variable must be called $post (IMPORTANT) ?>
<?php setup_postdata($post); ?>
<div class="news-kategorie">
<?php if ( has_post_thumbnail()) { ?>
<div style="float:left;margin-right:5px;width:75px;high:75px;">
<?php the_post_thumbnail('thumbnail'); ?>
</div>
<?php } ?>
<h4 style="margin-top:30px;">"><?php the_title(); ?></h4>
</div>
<?php endforeach; ?>
<?php wp_reset_postdata(); // IMPORTANT - reset the $post object so the rest of the page works correctly ?>
<?php endif; ?>
<?php } ?>
And in the German Version there are different this which I can choose. One is “Beziehung” and the other which I use here is “Artikel-Beziehung”. But for the “Artikel-Beziehung” I haven’t found a several documentation.
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.