How to change style of single words in site title, and in category or post titles?


(metacortex) #1

Any code put in titles, or referencing to css, just shows up as raw text in titles, like that:

How to make it behave like this:

How to change style of single words in site title, and in category or post titles?

Thanks for your help.


(Rafael dos Santos Silva) #2

Titles can only contain simple text, and emoji for topic titles.


(metacortex) #3

What is the reason why titles can only contain simple text?

For example: What about a js or html code to put in title that would somehow close the js before the input/data/variable and re-open it after or allow exception, some sort of a simple tweak that would render such kind of inline styling?

Thanks for your insight.


(cpradio) #4

That sounds like a XSS attack waiting to happen.

What reason would you want to highlight certain words in the topic title?


(metacortex) #5

What reason would you want to highlight certain words in the topic title?

For example when it is the title of a book (italicize), or for design, or ergonomic purposes. But since it is for “random” words and not for example “the first word of each category title”, it is quite difficult to code this I guess, or maybe by assigning a special cue that would code for italicize: for example when there are quotations marks, between the quotation marks", the title would become italicized. That would be a workaround, I guess there would be many other better ways of having this complete formatting option.

If anyone had a quick tweak idea that wouldn’t compromise security I would be so grateful.:awthanks:


(Mittineague) #6

The only way CSS would work for randomly placed words in a title would be to wrap individual words in spans (or other tags).

IMHO if it is important that you have this a better approach would be to code up something using JavaScript String functions.