Hello,
I am trying to get the standard audio player to appear in the post excerpt within a block.
Currently the audio embed is being stripped and the MP3 url is being displayed on the frontend.
Can you please give some advice on how to prevent the audio tags from being stripped and having the audio player appear within the block?
Than you very much.
Pesky WordPress does this to not break some things like RSS, etc. …
see old topic on this issue:
https://wordpress.org/support/topic/excerpts-remove-html-can-i-reverse-that
some folks use this plugin as a way to control it –
https://wordpress.org/plugins/advanced-excerpt/
Hey Chris,
Thanks for the reply, but how dare you call WordPress pesky 🙂
It is not the typical stripping of HTML tags that I am speaking of. It is the way that the Theme displays post content within the blocks.
I am trying to embed the standard WordPress audio player:
[audio mp3="http://domain.com/wp-content/uploads/2015/10/song-title.mp3"][/audio]
On the front end, within a block it simply displays the URL instead of loading the player:
[audio src="http://domain.com/wp-content/uploads/2015/10/song-title.mp3" /]
I know that the Theme strips some of these shortcodes. I’ve seen the function in the files before, but I can not remember where.
Any other assistance is appreciated.
Thanks.
Hi TaskTeam,
The theme uses a custom function for modules excerpts so to keep your audio files in the excerpt you could use this custom excerpt function: http://pastebin.com/PfzewZte and add it into your td_module file after the original excerpt function, like this: http://screencast.com/t/cu6VxMHLPU then call it into the module file on which you would want to use this: http://screencast.com/t/ovuqCJuq then when you would use the read more wp tag the posts excerpt will use your post’s content and display the embedded audios: http://screencast.com/t/5ILq6fks52Q0 – http://screencast.com/t/S7kJ4lgfL otherwise it will use theme’s excerpt functionality: http://screencast.com/t/WwhKsC7tC07 – http://screencast.com/t/rqCnwOTZN9XZ
Hope this helps!
Thanks