I have partly solved my own question so-to-speak. I’ve been trying to get post type relationships working for ages and the plugin relation post types as mentioned in my comment to Christopher’s answer. It is far from perfect, but I worked out how to get this plugin: http://wordpress.org/extend/plugins/relation-post-types/ – working (albeit not that pretty).
The following code will fetch a homepage carousel item and then an associated artist name. This can be modified to get related post meta as well. I wanted to use Scribu’s posts 2 posts plugin, but couldn’t work out how to use it.
$carousels = get_posts(array('post_type' => 'homepage_carousel'));
$counter = count($carousels);
$increment = 0;
foreach($carousels as $carousel):
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $carousel->ID ), 'large' );
$related_ids = rpt_get_object_relation($carousel->ID, array('artists'));
foreach ($related_ids as $related_id) {
$related_post[] = get_post($related_id);
}
<li style="background: transparent url(<?php echo $image[0]; ?>) no-repeat;">
<div class="carousel_content">
<p class="large_heading"><?php echo $related_post[$increment]->post_title; ?></p>
<p class="carousel_meta">
<?php if (get_post_meta($carousel->ID, 'learn_more_link', true)): ?>
<?php $link = true; ?>
<a href="https://wordpress.stackexchange.com/questions/6404/<?php echo get_post_meta($carousel->ID,"learn_more_link', true); ?>">Learn More</a>
<?php endif; ?>
<?php if (get_post_meta($carousel->ID, 'buy_cd_link', true)): ?>
<?php $link2 = true; ?>
<?php if ($link): ?> | <?php endif; ?>
<a href="https://wordpress.stackexchange.com/questions/6404/<?php echo get_post_meta($carousel->ID,"buy_cd_link', true); ?>">Buy CD</a>
<?php endif; ?>
<?php if (get_post_meta($carousel->ID, 'buy_mp3_link', true)): ?>
<?php if ($link2 || $link): ?> | <?php endif; ?><a href="https://wordpress.stackexchange.com/questions/6404/<?php echo get_post_meta($carousel->ID,"buy_mp3_link', true); ?>">Buy MP3</a>
<?php endif; ?>
</p>
</div>
As you can see this is very hacky and by no means a definitive solution. It worked for me, but I am still unhappy with how the above code works. To get associated post meta it would need more code.
As there is no answer, should this perhaps become a wiki more than a question perhaps? As the solutions listed here will not always be current as WordPress is constantly evolving and new plugins being released.