Home › Forums › General Issues › Querying relationship fields › Reply To: Querying relationship fields
Thank you SO much! This is what I ended up with…
<div>
<?php $associations = get_field('associations');
if( $associations ): ?>
<?php foreach( $associations as $association): ?>
<?php
$photo = get_field('investment_logo', $association->ID); ?>
<a href="<?php the_permalink() ?>" title="<?php printf(__('%s','rys'), get_the_title()) ?>" rel="bookmark">
<img src="<?php echo $photo['url']; ?>" alt="<?php echo $photo['alt']; ?>" />
</a>
<?php endforeach; ?>
<?php endif; ?>
<a href="<?php the_permalink() ?>" title="<?php printf(__('%s','rys'), get_the_title()) ?>" rel="bookmark" >
<?php the_title(); ?></a>
<em><?php the_field('publication_source'); ?></em>
<span><?php $date = get_field('publication_date'); echo date('F d, Y', datepicker_to_unix($date )); ?></span>
</div>
Really appreciate your quick response! Thank you!!
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.