How to hide link in the post if user not login

I want hide link in the post when user not login, how do it with disourse.
Thank all!

who is help me?
Thank support!

Add this CSS customization

.anon .cooked a { display: none; }

Tks support team but i want display like this.
Log in or register to see the link

It is xeforo forum.
Tks to support!

Wait, you’re asking help about a XenForo forum on a forum about Discourse? :confused:

1 Like

Oh No…I want to ask the function hide link on Discourse when user not login/register like Xenforo…I described in the article content.
How can do it on Discourse?
Thank support!

1 Like

The CSS posted previously will change

If you want to <a href="">know more</a> click here.


If you want to click here.

but if you want

If you want to know more click here.

AFAIK that can’t be done with CSS only and will either need JavaScript or server-side script to do.

I think using the CSS with an additional pseudo-element (::before, ::after content ?) might be easy enough if you don’t mind the links getting the same replacement.


Thank you! But i want not display link (cant click link) when user not login/register.So must login for can click link.

1 Like