Viewing 2 replies - 1 through 2 (of 2 total)
  • sdhunt

    (@sdhunt)

    I don’t know if this is what you need but you can access and print just the mp3 url from the enclosure custom field like this:

    <?php
    $enclosureData = get_post_meta($post->ID, 'enclosure', true);
    $duration = false;
    if ($enclosureData) {
    list($EnclosureURL, $EnclosureSize, $EnclosureType, $Serialized) = split("\n", $enclosureData);
    $EnclosureURL = trim($EnclosureURL);
    echo $EnclosureURL;
    } ?>

    Hey sdhunt or anyone else who might know the answer to this. I think I’m wanting to do something similar here, and I can’t get it to work. I’m aggregating various podcasts on my blog here

    here are a couple of the rss feeds that contain podcasts of interest:

    (this one wont show correctly in posts…that is, it does not link to the source mp3 directly) https://afripod.aodl.org/?feed=podcast

    (this one correctly points to source mp3, and displays correctly, here’s an example on my site)https://downloads.bbc.co.uk/podcasts/worldservice/africa/rss.xml

    I’m using “Add Attribution for FeedWordPress” which has been perfect for adding proper attribution so far. Using the [original-url] short-tag I have been able to successfully link directly to the source mp3 using Add Attribution plugin on the bbc podcast. However, on the afripod podcast, the mp3 link will not display at all.

    So what have I tried? I tried your suggestion sdhunt, and it did not work for me. I tried the code in many locations to no avail. Also I tried setting a custom field of $(item/enclosure/@url) but this also did not work. This problem is driving me absolutely nuts because I know it’s something so simple and I just can’t see what I’m doing wrong!

    Essentially I want the aggregator to print a link of the source mp3 url.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[plugin: FeedWordPress] Mp3 player’ is closed to new replies.