I'm using the plugin advanced custom fields to create custom fields to create a relationship between two pages.
The code below is looking at the relationship field and grabbing the page title and company logo of the linked page.
The only problem is that instead of outputting the image url (so it displays the image), it's outputting the attachment ID. How can I convert the attachment ID into a url so the image displays?
<?php foreach(get_field('connections') as $relationship): ?> <img src="<?php echo get_post_meta($relationship->ID, 'company_logo', true ); ?>" height="57" width="250" /> <a href="<?php echo get_permalink($relationship->ID); ?>"><?php echo get_the_title($relationship->ID) ?></a> <br /> <?php endforeach; ?>