0

I'd like my tagline to have specific styling - but not all of the tagline, but just some words should be bold/italised/different color. How do I wrap <span> around specific tagline words? Can it even be done?

I know how to change the style of tagline in general (targeting .masthead-content p), but this affects the whole tagline. I need to target specific part of it. Thank you!

1

A quick search online for html in your tagline came to this site: https://www.kirstencassidy.com/allow-html-code-in-wordpress-tagline/

It seems like it is your answer.

It explains that you would update your theme file to use the echo html_entity_decode function:

<h2 class="tagline"><?php echo html_entity_decode(get_bloginfo('description'));?></h2>

Then, you can just use html in your admin > settings page like so:

This is <span class="some-class">my tagline</span>
  • Thank you so much, I did google, but must have been using the wrong terms. – Newbie May 26 '18 at 22:14
  • No worries @Newbie - I'm new to this site as a contributor, but if this is the answer, please mark it as such (if you haven't already) – Adam May 28 '18 at 22:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.