Special symbol or text when a post is featured

Hi! How is it possible to display a special icon or text above the post in the source theme when a post is featured? Similar to the casper theme for example? Does anyone have an idea? Thank you very much!

Yep. That theme writes a .featured class for featured posts, so you can use that as a “handle” to add something to those posts, as long as it can be accomplished with CSS. Here’s a 10 second example:

article.gh-card.post.featured {
  background-color: pink;

But you probably want something more like …

article.gh-card.post.featured .gh-card-title::after {
  content: " ⭐"
1 Like

Thank you! Works perfect!

But I have an additional question: I would like to have a different background color for all posts from a certain tag. Not on the homepage, but when the posts are opened (now the background for every post is white for example). Is that possible somehow?

So you’ll want to inspect the page to see if there’s a specific tag applied to those posts. If yes, the approach would be similar!

Can you give me an example? let’s just call the tag “news”.

I just want that the posts which are included at this tag, have an other post-background.

Yes, it possible, add code into ‘site header’ through ‘Code injection’

  .post-template.tag-news .gh-viewport {
    background-color: lightblue;
1 Like

Wow thank you! Perfect!