• Hello everyone. I’m trying to customize my single.php file so every post is embedded with it’s podcast and player. The format is as follows:

    categoryname.day.month.year.mp3

    I have the code working great, the problem is getting an mp3 player to wrap around it.

    <?php echo $categories[0]->cat_name ?>.<?php echo $date ?>.mp3

    I’ve tried to call a plugin from using the add shortcode to php function like this, but I can’t seem to get it to work

    <code><?php echo do_shortcode(&quot;[Shortcode]&quot;); ?></code>
    
    The podcast player requires the code to be enclosed with [podcast][/podcast]
    
    the full code is as follows:
    <code></code><?php echo do_shortcode("[podcast]http://mydomain.com/podcasts/<?php echo $categories[0]->cat_name ?>.<?php echo $date ?>.mp3[/podcast]"); ?><code></code>
    
    I've also tried this variation:

    <?php echo do_shortcode("[podcast=http://mydomain.com/podcasts/<?php echo $categories[0]->cat_name ?>.<?php echo $date ?>.mp3]"); ?>`

    any ideas or suggestions? Unfortunately I don’t have a link I can post as this isn’t live yet.

    I don’t have to use the podcast plugin, I can use something else. I’ve tried it with the powerbeam plugin by blubrry but I still can’t get it to work.

    I think the problem is the php calls in the URL name. I can create text download links with work just fine, create the proper file name with date and .mp3. The problem is getting it to embed as a player file.

The topic ‘Embed mp3 player plugin outside of loop?’ is closed to new replies.