Support » Plugins » WordPress function to create enclosure?

  • I’m writing a plugin that gets an MP3 URL from another server, and appends it to the end of the post using the the_content filter.
    But what I really want is to add the MP3 with a media enclosure, so the RSS feed looks like a podcast. Is there any WordPress function which will take a URL and generate an enclosure for me, or do I have to do it on my own?
    I did try searching the codex but couldn’t find what I was looking for.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I couldn’t figure this out, other than creating the enclosures (and modifying the RSS feed) myself – more programming than I want to do right now.

    In case anybody is wondering how I solved this, I simply installed the Blubrry PowerPress plugin, and did a do_shortcode([powerpress url=\"$mp3_address\"]); which handles all the podcasting magic for me.

    Well… that inserts the player, but doesn’t do the podcast magic.
    Turns out I spent a day over-thinking the problem. WordPress creates the podcast enclosure from a custom field called ‘enclosure’. So all you do is update the enclosure field to have the URL of your MP3

    Jason Paul


    I can’t figure out how to control the text title of the mp3 enclosure. It outputs the entire link to the url visibly where i’d like it to pick it up from the Title. Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WordPress function to create enclosure?’ is closed to new replies.