Embedding soundcloud link on featured image post to launch mp3 player on

So I've been searching the web and I can't find a good answer on how to have a featured image with a play button, once I click the play button it launches a mp3 player built on wordpress site. Much like this site -> indieshuffle.com

Does anyone know how to do that or at least give me some material to start with even a theme would be amazing

Answers


Although its a very simple task, if you dont have enough knowledge of programming then it will be hard to achieve. And not many people will help you on stackoverflow without any existing code to show them.

Here's how i would have achieved it. First i would attach the featured image to the post (the default functionality). Then i would create a custom field to save the soundcloud id of the song. Then in your theme you should wrap the featured image with a div and have a play button on hover. Then use javascript/jquery to look for click events (ie. what should it do when someone clicks on the image). Then i would use the Soundcloud API and use the play function to play the desired song. Here is a code i got from the API docs.

<script src="http://connect.soundcloud.com/sdk.js"></script>
<script>
SC.initialize({
  client_id: 'YOUR_CLIENT_ID'
});

// stream track id 293
SC.stream("/tracks/293", function(sound){
  sound.play();
});
</script>

Just take it slow, start from the beginning and go through the points i mentioned, it would be much easier to help if you start somewhere and ask a specific question.

You might already be familiar with the embed code, but if you just want to show the song in your post you can use the embed code in your post. Something like this https://soundcloud.com/pages/embed. There are also some wordpress plugins for soundcloud that will automatically embed the code if you give it the id of the song.


Need Your Help

Char decrementing php

php

I already know that the following code works well

improving views performace in sql server 2012

sql-server views pivot transpose

I have one view vwBalance which returns more than 150.000.000 rows, bellow is the code:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.