Is there an easy way to automatically wrap any h2 element in the div class “entry-content” in another div class “entry-header”
So the end result would look something like:
<div class="entry-content">
<div class="entry-header">
<h2>Some Title</h2>
</div>
</div>
I assume this can be done with PHP, but I’m not sure. Thanks for any input!
In terms of wordpress I would probably verge towards creating a shortcode such as
I would make the shortcode take the content and wrap the given code around it.
See some documentation here: http://codex.wordpress.org/Shortcode_API