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:
<div class="content">
<? the_content(); ?>
</div>
And style it like so:
.content p { ... }
/* Page-specific */
.page-id-1 .content p { ... }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With