Title: [Plugin: Audio Player] insert_audio_player doesn&#039;t work with rss
Last modified: August 19, 2016

---

# [Plugin: Audio Player] insert_audio_player doesn't work with rss

 *  [gekido](https://wordpress.org/support/users/gekido/)
 * (@gekido)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-audio-player-insert_audio_player-doesnt-work-with-rss/)
 * I’ve been working on a site with a ton of audio content that we’ve setup using
   the ‘insert_audio_player’ function, like so:
 *     ```
       // if there is an audio file, show player
       if (function_exists("insert_audio_player")) {
       	$audiofile = get_post_meta($post->ID, audio, true);
       	$author = get_the_author();
       	$podcasttitle = get_the_title($post->ID);
       	// do we have one?
       	if($audiofile) 	{
       		insert_audio_player("[audio:".$audiofile."|titles=".$podcasttitle."|artists=".$author."|width=100%]");
       	?><a href="http://www.mysite.com/audio/<? echo $audiofile; ?>">Click to Download the Audio File</a><?
       	}
       }
       ```
   
 * Each audio file is setup as a custom field called ‘audio’ which the above then
   uses to render the player etc.
 * The problem (which is a major one) is that using the ‘insert_audio_player()’ 
   function doesn’t behave the same as using the [audio: file.mp3] shortcode and
   the audio content is completely ignored for things like podcasts & other rss 
   content.
 * I have been fighting with this for waaay too long now and finally did some testing
   of some simple [audio: file.mp3] short codes added directly into post, and noticed
   that these shortcode links behave completely differently than using the include_audio_player()
   function does.
 * Specifically, if you use [audio: myfile.mp3] directly in a post, when saving 
   the post, there is a new custom field called ‘enclosures’ added to the post that
   contains the info required for an rss feed, ie byte size & entry name
 * So, my question is: how do I fix the ‘include_audio_player()’ function so that
   it properly adds the ‘enclosure’ custom field for my rss feeds?
 * Thanx in advance,

Viewing 1 replies (of 1 total)

 *  Thread Starter [gekido](https://wordpress.org/support/users/gekido/)
 * (@gekido)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-audio-player-insert_audio_player-doesnt-work-with-rss/#post-1885648)
 * after digging through the source and trying to get my head wrapped around how
   things are working it appears that the main issue that i’m looking at is the 
   fact that the ‘include_audio_player()’ function simply isn’t designed or intended
   to work as a part of a post or page template, but is intended for ‘outside the
   loop’ usage…which is unfortunate because it’s much easier for me to train clients
   how to add an ‘audio’ custom field and paste the name of their mp3 in than have
   them remember the syntax of the audio shortcode.
 * Having said that, I’m going to experiment with ID3 tags (they don’t / haven’t
   tagged their mp3’s up to this point) so this may be a moot point / not a problem
   going forward.
 * we’ll see.

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Audio Player] insert_audio_player doesn't work with rss’ is 
closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/audio-player.svg)
 * [Audio Player](https://wordpress.org/plugins/audio-player/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/audio-player/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/audio-player/)
 * [Active Topics](https://wordpress.org/support/plugin/audio-player/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/audio-player/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/audio-player/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [gekido](https://wordpress.org/support/users/gekido/)
 * Last activity: [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-audio-player-insert_audio_player-doesnt-work-with-rss/#post-1885648)
 * Status: not resolved