• 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/

Viewing 1 replies (of 1 total)
  • Your solution seems fine.

    The reason why you couldn’t do it before: The list of tags shown on the options page is not complete and it’s already extensive as it is. HTML5 tags are not listed because I did not expect people to use them.

    Advanced users can always use the template function for more flexibility (you can use any tag with allowed_tags) or modify the plugin, like you did.

    I have some ideas for more advanced excerpt manipulation (element-specific rules, for example), but don’t expect that anytime soon. I am sure this works for now.

Viewing 1 replies (of 1 total)
  • The topic ‘Using Advanced Excerpt with MediaElement.js Player’ is closed to new replies.