Support » Fixing WordPress » Style individual words in post title

  • Hey guys,

    Just wondering whether it is possible to style individual words within a post title?

    E.g. My title is How to style WordPress titles and I would want the word style highlighted.

    I think I have seen this done across a few ThemeForest themes, but don’t have concrete samples.

    Any help or tips is highly appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Can you control the post title in a way that you can add bold styling to individual words? If so, you may be able to use some CSS that changes that bold styling in that post title.

    Nah, I don’t think so. Meaning, I’m using Gutenberg and as far as I understand, you cannot use custom HTML in the title.

    I’m guessing that I am out of luck then?

    Moderator Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    There’s always a way but the next way to do this would be to use a script. A script would find the page title, find the word you want (you’d have to know in advance which words you want to highlight). The script would add HTML around that word and then you would style that HTML using CSS.

    That’s not impossible, but from a user’s perspective it’s not a great use of their browser resources.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.