Using Advanced Excerpt with MediaElement.js Player
-
I am using MediaElement.js HTML5 Player to embed an audio player at the top of my blog posts.
I wanted the player to appear at the top of my custom excerpts but Advanced Excerpt was stripping out the
<audio>
tag which the player uses.I was tempted to use the “don’t remove any markup” option, but I wanted to include IMAGES near the top of posts and have those stripped out for the excerpts.
If anyone else is having this problem, or something similar, and is looking here for a solution, here is one which works for me:
You can add tags to the plugin.
Open advanced-excerpt.php and add the tag you want to include to the list. For example, I changed the following line (63) from this:
‘a’, ‘abbr’, ‘acronym’, ‘address’, ‘applet’, ‘area’,To this
‘a’, ‘abbr’, ‘acronym’, ‘address’, ‘applet’, ‘area’, ‘audio’,It added an audio tag to the popup list of available optional tags.
I unchecked the img tag, added the audio tag and it works fine…so far.
If anyone knows why this is not a good idea, please post advice here.
https://www.ads-software.com/extend/plugins/advanced-excerpt/
- The topic ‘Using Advanced Excerpt with MediaElement.js Player’ is closed to new replies.