Only users can read the reply,how to enable?


As we know,we can enable only users can read the content in the setting. How to enable only users can read the reply,and anoymous can only read the first post?

Help with hiding content until someone registers
(Jeff Atwood) #2

There is no way to do this in Discourse.


even no plugin to realize this function?

(Régis Hanol) #4

To my knowledge, there is no such plugin either.

(Fábio Machado De Oliveira) #5

I think it may be possible to hide the replies from anonymous users with custom CSS. But I’m not sure of that, and advanced users could workaround it anyway. Would that be useful for you?


Any examples? Would this be overwritten by discourse update?

(Fábio Machado De Oliveira) #7

If it works, you would put it in the customize css in the admin interface, and it isn’t overwritten by updates.

(cpradio) #8

CSS Solution (I think)

.anon { display: none; }

Put that in your Customize > CSS (for both Desktop and Mobile)

(Fábio Machado De Oliveira) #9

It worked perfectly on my test instance

(Fábio Machado De Oliveira) #10

Added some red text instructing the user to login:

.anon { display : none; }

.anon { 
    font-size : large;
    color : red;
    text-align : center;
    content : 'Login to see replies'; 

On a hindsight, it would be better to just change the button text from the “Reply to Login” button


The solution is really excellent.


And how to change the button text from the “Reply to Login” button?

(cpradio) #13

Can you make a screenshot?

This is what I see on Meta.