Support

Account

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!!