Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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 in elements to the format drop down?

  2. Wordpress strips out the element when the editor loads, so saving the page again removes the tag. How can i white list "summary"?

share|improve this question
add comment

1 Answer

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:

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.