Site logo

Archived topic

How to show a custom ICON/TEXT on the title of a Sticky post title only?

5 replies · Started by Guilherme Lacerda on June 25, 2020

Viewing posts 1–6 of 6

Hi GP Team.

I have a blog with the homepage with summary mode, and have some sticky posts.

How to show a custom ICON/TEXT on the title of a Sticky post title only?

Some like this:

Hi there,

What kind of icon are you going to use?

FontAwesome?

Yes! FontAwesome or emojis. =)

Maybe a text "[FIXO]" before the tittle.

Hi there,

you can use a CSS :pseudo element and the content property like so - this is using the fire emoji code point:

.post.sticky .entry-title:before {
    content: '\01F525';
    margin-right: 0.25em;
}

content can also accept Text:

.post.sticky .entry-title:before {
    content: 'FIXO';
    margin-right: 0.25em;
}

more info re: content

https://developer.mozilla.org/en-US/docs/Web/CSS/content

DONE!

Thanks. =)

Glad to be of help

This archived topic is closed to new replies.