Home › Forums › Front-end Issues › Add Class to Paragraphs in WYSIYWG Field › Reply To: Add Class to Paragraphs in WYSIYWG Field
There isn’t any realistic way of adding classed to the html generated by WP. You would need to use regular expressions to parse the html to add the classes.
The best solution to style paragraphs is to use a CSS selector that targets them based on parent element classes that already exist and not to add a class to every p tag.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.