Support » Plugin: PowerPress Podcasting plugin by Blubrry » Get Media URL Only

  • Hello,

    Is there a way to display just the media URL from a post and turn it into a link? Specifically I’m looking for this kind of output:

    <a href="[Powerpress Media URL]">Download Blah Blah Blah</a>

    I’d like to have a list of simple download links on my blog without the player, but I don’t know how to go about doing this. Anybody have any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Angelo Mandato


    The download, play in window and embed links need extra meta data to be displayed. So if you use the shortcode specifying a media URL, that meta information for that media URL will not be known and thus PowerPress does not display the link options.

    If all you want to do is offer a download link, the easiest and preferred way to do this is to add it to your content. Simply go into your blog post content, go to the location in the content where you want to put the download link, give it a label, highlight the link, then use the URL icon in the “what you see is what you get” editor tools bar across the top and add the link to the media that way.

    It may not be preferred, but I’d very much like to be able to access the URL of my media file in a WordPress template, and to present it outside the player. Is there a variable I can call?

    Plugin Author Angelo Mandato


    If you’re in the loop, you can use PHP code to get the podcast data in an associative array. Function is called powerpress_get_enclosure_data. I would code something like this…

    if( function_exists('powerpress_get_enclosure_data') )
        $EpisodeData = powerpress_get_enclosure_data($post->ID);
        if( $EpisodeData )
           $url = $EpisodeData['url'];
           // what you need to do here...

    This is what you are looking for correct?

    The $EpisodeData has the following fields:

    id – post id
    feed – feed slug (podcast default, but if podcast channels is on then this is different)
    url – url to media file
    duration – time in seconds of media
    size – size in bites of media file
    type – content type (e.g. mp3 = audio/mpeg)
    width – video player width
    height – video player height
    (there is more if you enable other options in PowerPress, but you get the idea)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Get Media URL Only’ is closed to new replies.