-
ngodong
Hi guys,
I’m looking to automatically add a CSS class (such as “site-name-dkt”) to a specific string of text (such as “Dong Knows Tech”) for any post.
Is there a simple PHP snippet for this?
Thanks,
-Dong.
-
Fernando
Hello Ngodong,
To clarify, are you looking to add that class to any Block that has the text “Dong Knows Tech”?
-
ngodong
I want the class for the actual text string itself, like in case I want to add change color or font for that particular text, no matter where it appears in the page.
-
Fernando
You’ll need Javascript for that. This would be out of our scope.
It might be good to reach out to a developer regarding this as this may be a bit complicated.
-
ngodong
So what should I do if I want to add the class to an entire block with the text string?
-
Fernando
Can you provide a link to a page and point us to an example block/text you wish to add the class to?
- You must be logged in to reply to this topic.