How to List New Podcast Episodes in WordPress with Custom PHP in Six Steps

If you don't know PHP, it can be tricky to figure out how to list your latest podcast episodes on your WordPress site. The method I will share with you is do it for each of my podcasts in the sidebar. This works in WordPress 3.0.

  1. Pick a tag for your podcast posts, like “podcast-episode,” and add it to all of your posts that you want to be listed as podcast episodes. It doesn't matter if they're in different categories.
  2. Install Execute PHP Widget plugin. WordPress doesn't allow PHP in text widgets, but this plugin creates a new widget type that can run PHP code, which we'll need for this to work.
  3. Go to the Appearance > Widgets in your WordPress admin and drag PHP Code into the widget area of your choice.
  4. Give the widget a title as you normally would
  5. Insert the following code into the content area. I'll explain how to adapt it.
  6. Save your widget and look at your site!

Line 4 is the important line. replace “&category=0” with the ID number of the category of the podcast you want to list. For example, my Are You Just Watching?™ podcast is category 4, so I would write “&category=4” in there. If you want this to list all your podcasts from every category, remove “&category=4” from line 4.

You'll also notice that we put “&tag=podcast-episode” in there. That's how it knows to list every WordPress post with the tag “podcast-episode.” Adapt accordingly with the tag you use. I personally use “podcast,” but may change that to “podcast-episode.”

About the Author
As an award-winning podcaster, Daniel J. Lewis gives you the guts and teaches you the tools to launch and improve your own podcasts for sharing your passions and finding success. Daniel creates resources for podcasters, such as the SEO for Podcasters and Zoom H6 for Podcasters courses, the Social Subscribe & Follow Icons plugin for WordPress, the My Podcast Reviews global-review aggregator, and the Podcasters' Society membership for podcasters. As a recognized authority and influencer in the podcasting industry, Daniel speaks on podcasting and hosts his own podcast about how to podcast. Daniel's other podcasts, a clean-comedy podcast, and the #1 unofficial podcast for ABC's hit drama Once Upon a Time, have also been nominated for multiple awards. Daniel and his son live near Cincinnati.
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Newest Most Voted
Inline Feedbacks
View all comments
Ian Robinson
10 years ago

What is the code mentioned in step 5?

Maaher Aldoos
Maaher Aldoos
5 years ago

Thanks but this what I want 🙂

Would love your thoughts, please comment.x