How to display "author" on the right side of username

Hi,

I’d like the Topic author to be displayed with a title (Attributes?) “author” on the right side of the username.

If the topic author has replied a post, then we can see the word “author” would be displayed at the right side.
Here is what it looks like:

Selection_813

or

Selection_814

Can anybody tell me how to do it?
Thanks a lot! :heart:

here is some thinking I’ve made, I don’t know how to work it out.

if someone = topic creator in a topic
then display “author” at the right side of the username
otherwise, display nothing

hier is some code what I got last time for displaying the post number, I think it could be similar to this one.

a.post-date span {
margin-right: 1em;
}

a.post-date:after {
content: attr(data-post-number)“post”;
}

1 Like

Hello @neo,

I made this kind of author badge before… You can see here :arrow_down: I hope it helps :slightly_smiling_face:

3 Likes

Thank you so much! :heart: :heart: :heart: This is really what i’m expecting for!

here is my customization based on your code.

Selection_813

And i realize that “author” would be hidden after the other repliers on desktop, in my case, it looks like this:

// Hide from embedded posts
.topic-owner article .row .embedded-posts .topic-body .topic-meta-data .names::after {
content: “”;
border: none;
padding: none;
}

but it doesn’t been needed on mobile, why is that? :face_with_raised_eyebrow:

1 Like

Glad you like it :heart::slightly_smiling_face:

If you use the new filtered replies (what meta use too) on your Discourse then you don’t need to use the

// Hide from embedded posts line
.
.
.

Only use these lines :arrow_down:


Because the embedded replies function wasn’t on mobile by default. :slightly_smiling_face:

1 Like