Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter digiman9999

    (@digiman9999)

    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

    Thanks for the reply.

    The above method simply added a link to the existing/first post category. I think what we need is to make up a new ‘Post Category’, which I’m guessing will go in the header.php, and then put the links underneath that.

    Cheers

Viewing 2 replies - 1 through 2 (of 2 total)