WordPress Complete(Sixth Edition)
上QQ阅读APP看书,第一时间看更新

Adding audio to blog posts

Not surprisingly at this point, it turns out that WordPress makes adding audio to your blog posts, just as easy as adding a video. To demonstrate this, I'm going to create an entirely new post and call it, Some Paleo Wisdom With Robb Wolf. In it, I'm going to share a podcast episode of Robb's. To do that, just like with videos, I have to get a direct URL of the audio file that I want to share on the blog.

Going to Robb's site, I quickly find the episode I'm after available at http://traffic.libsyn.com/robbwolf/PaleoSolution-240.mp3. So, I take this URL, and just like with video, I paste it right into my new blog post's content box as follows:

Check out this great podcast episode by Robb Wolf:
http://traffic.libsyn.com/robbwolf/PaleoSolution-240.mp3

WordPress will pick that URL immediately and turn it into a live audio streaming. When I publish my new post, this becomes visible right away. The next screenshot presents what my new post looks like on the front page:

Now, in this example, I used a direct URL address of an audio file (the MP3 podcast), but I can also use a direct URL of an audio recording at SoundCloud, Spotify, or Rdio, plus a bunch of other services. Again, to get the full list of supported platforms, feel free to visit https://codex.wordpress.org/Embeds.

Adding raw audio files is possible too. However, this presents the same problems as we mentioned when talking about video files. Even though audio files are always smaller in size than videos, they can still cost you a lot of money if you're attempting to host them on your standard web server. It's, therefore, usually a better solution to upload your audio somewhere else (such as, SoundCloud, for example), and then just embed the audio inside of a blog post like we're describing here.