I have a client who uses the PowerPress plugin to manage their Podcast. One of the fields filled in for this plugin on each post is a URL to the MP3 file. The only way it seems I can retrieve the URL entered into this field programmatically is via a PHP function in my functions.php file. The code they provide is:
function powerpress_podcast_url( $EpisodeData ) {
if( function_exists('powerpress_get_enclosure_data') ) {
$EpisodeData = powerpress_get_enclosure_data( get_the_ID() );
if( !empty($EpisodeData['url']) ) {
return htmlspecialchars($EpisodeData['url']);
}
}
}
So, if I were to enter "echo powerpress_url(25980);" in a page template file, I would get something like => hidden link
I need help getting this function into a form that I can use in Views. I've read the shortcode links you have on your site but I just can't figure it out.
Hello,
There isn't such kind of built-in feature within Toolset, it depends on the PowerPress plugin you mentioned above.
I suggest you check it with author of PowerPress plugin, check if there is any shortcode to display the URL of MP3 file, then you can put this shortcode into Views content, see WordPress document:
https://codex.wordpress.org/Function_Reference/add_shortcode
Adds a hook for a shortcode tag.