HTML5 Summary tag in editor

I'd like to use the summary tag to summarise the content of a post, but I'm facing a couple of issues doing that:

  1. There isn't an option for it in the wysiwyg - how can I add elements to the format dropdown?

  2. Wordpress strips out the element when the editor loads, so saving the page again removes the tag. How can I whitelist <summary>?


You can use the $allowed_tags global. Add the following to your functions.php file.

global $allowedtags;
$allowedtags['summary'] = array('class' => array());

Add more attributes within the array similar to the class element. You can learn more on Otto's post here:

Tags: Tags / Editor / Wysiwyg

Similar questions

How can be used with the HTML5 Audio tag?
I'm trying to find out if I can trigger a new window when the play button is pressed on an html5 audio player. Here's what my client wants: My brain immediately wants to treat the play button like an behavior that would trigger a but I can't find if this is possible. By the way, using a Flash player is not an option in this ...
Audio HTML5 Tag not working in Wordpress
I'm in the middle of migrating my current website into Wordpress and was having troubles getting the audio HTML5 tag to work properly. I am basically using a copy and pasted version of the existing code I've been using on the current website (see below, also note I have only edited the source src location to use the entire URL, replaced the php ech...
html5 video tag .ogv video file type is not working on firefox
I am having trouble playing the .ogv file in firefox. here's the link I think my syntax for html5 video tag was correct because its playing oon other browsers. thanks in advance!
html5 audio tag is not playing audio
I am trying to embed a html5 audio tag in my web page here is the code. path of both the files mp3 and ogg are correct, the issue is when the page loads first time it will display the player correctly but suddenly it will transform into something like the image below.
Why does HTML5 audio tag show error on iOS?
I have a WordPress site, I am using the Gutenberg editor, and an Audio block. This adds a little audio player to the page, which works on desktop and Android. It is not set to auto play. On iOS (I've tested on iPhone and iPad), when I press play, it loads for a second, then changes to say "ERROR". Does <audio> not work on iOS?
I want to add the button on the page editor and post text editor in new WordPress Gutenberg editor
I want to add the button on the page editor and post text editor in new WordPress version I am using this code to add the button of the page and post editor in word press. Can you help me to solve this problem?

Also ask