• Resolved Garrett Cobarr

    (@garrett-cobarr)


    So I have been getting a bit cocky about what I can get away with in CSS but I just got bitten in the ass. I added some inline styling to my titles in some pages (but not posts). It creates a nice look, some drama and readability by applying a darker and italic style.

    Visual Example

    This is accomplished by placing the following in the post title field…

    Colophon <em style=”color: #999;”>–The Making of WholeThinking

    Everything seemed fine until I was making some changes to the site Search and executing some tests. When the Search displays any of the pages that have these kinds of stylings I get a fouled title. The best way to see this is to go to the link above and enter “company’ in the Search field. The title has the following text…

    “–The Making of WholeThinking”>Colophon –The Making of WholeThinking”

    Any insights? Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Don’t add markup to the post title field?

    Thread Starter Garrett Cobarr

    (@garrett-cobarr)

    It is bad, it is a no, no?

    I would like to keep it if I could make an adjustment to the style and have it work. Does anyone know why this happens?

    Definitely a “no, no”. You should be styling posts titles – even individual titles – via your theme’s stylesheet.

    Thread Starter Garrett Cobarr

    (@garrett-cobarr)

    Thanks, esmi. It occurred to me after the posted question that everything is stored in the database, in its own field, the post tile being one of them. It is an interesting lesson in what you initially see may not be what is stored and returned.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Site's Search is creating odd Title from inline style’ is closed to new replies.