Hi!
I would like to get (then add custom class) each paragraph (p) from acf WYSIWYG field. Is it possible ?
I already tried get_sub_field('text', false, false)
but it doesn’t work since I have multiple “p” in my field and I need to separate them.
Thank you for your help!
(Sorry for my English, I’m not fluent..)
There isn’t any way to do this without parsing the returned text using a regular expression or otherwise parsing the returned string.
My suggestion would be to use a container div that has a class and target the paragraphs in it.