Hi realtm,
Many thanks for your comment, your PHP skills are much better than mine and worked a treat. It’s use is to use WP custom fields to store a Soundcloud ID. This can then be called to include a track either on a single post, or as a compilation of all tracks from all posts, like a jukebox elsewhere on the site. For those looking to do this themselves, here’s the final code included in content-single.php, only displaying the Soundcloud box if a track ID is present:
<?php if (get_post_meta($post->ID,'soundcloud1',true))
{
$myShortcode = "[soundcloud id=".get_post_meta($post->ID, 'soundcloud1', true)." artwork=false playerType=html5]";
echo do_shortcode($myShortcode);
}
?>
Awesome, cheers