I’m sure this is simple, but I’ve searched Google for about 30 minutes with no luck. I’d like to know if it’s possible to adjust the default class of paragraphs that are output by the_content in WordPress.
I’ve read that you can add filters to the theme’s functions.php file, but this particular use of WordPress isn’t using a theme. Think of a static HTML site (5 pages) with a main content area on each page. WordPress is literally only used to change the contents of those 5 content areas by the client editing any of the necessary 5 posts.
The problem is that the p tags that WordPress spits out don’t have any classes applied to them. Can I change that in my query or anything? Ideally I’d be able to change the paragraph class that is output on each page individually.
Thoughts?
Thanks in advance for any help!
Wrap your content with a div, and apply a class to that:
And style it like so:
The accepted answer didn’t really answer the question for me, but I found this post which gave me what I neededâso my solution ended up being something like this:
That did the trick!