Is there a way to add a class to all parent elements inside the_content?
My problem is I'm using this kind of css selector:
This is to due with mostly paragraphs, but also any other element that might be added to the post which won't be wrapped in a paragraph.
I thought the best way to avoid this (as its an expensive selector) would be to add a class to those elements.
I would like a php solution, a filter in the_content that would let me add (not replace) the class of elements just below .post_content (or parent elements in $content).