Guest Gate Theme Component

So I unchecked the box - Screenshot - 50b6ee19e5e09edd5cee337f329be7a5 - Gyazo

But still the user is not automatically logged in from WordPress. Now both the buttons direct to /login page which is the Discourse Connect link for the site.


I pushed an update for Discourse Connect usage.

This update removes signup button when Discourse Connect enabled and only show a Log In button. I also added different text to Discourse Connect login button guest_gate.sso_log_in . Which you can find under theme translations, the default text Log In . This update also add a custom text guest_gate.or default or separator which appears between login and signup links. Only appear when you use links and not buttons.

And now add another update to the component.

This update will add icon to Log In and Sign Up buttons. I also add some settings to change icons.


Thanks Don! After this update my Sign Up button disappeared, any idea why?

1 Like

Memberful is also use Discourse Connect? Can you check that? Thanks :slightly_smiling_face:

Yes it does use Connect

1 Like

I see now on your site the Join NPN button on header is custom button and the Sign In button use Discourse Connect. Guest Gate modal works as expected because you use Discourse Connect login so the signup button is not appear by default. It is hard because users who use Connect cannot use guest gate custom urls settings for authenticate login because that url is mostly generated. But it seems to Memberful login url is not contains generated section.

I think we should make separate settings for Discourse Connect usage. :thinking: I will add a setting to add sign up button to Discourse Connect.


@Himanshu_Singh and @davidkingham I pushed an update to Discourse Connect signup button.

It will add a settings and translation to Discourse Connect logins. You can disable the custom url enable section and check the enable discourse connect signup checkbox then paste the signup url in discourse connect signup url what you use in custom signup url.

Theme Settings
Screenshot 2022-07-05 at 17.47.14

Theme Translations
Screenshot 2022-07-05 at 17.47.42


Brilliant, thank you so much Don!

1 Like

I have been using it with dismissable false (“Removes the close button, which prevents visitors from closing it.”) in the default, unticked state.

Tonight I tried ticking that option. It successfully removes the “x”. But if you click to log in or sign up, then it’s possible to dismiss that modal and go back to the forum as if nothing had happened. Is there any way round this? Thanks.

Yes, that is the way it working.

To handle this you need to enable this setting. It will redirect the visitor to the homepage when clicking to Log In or Sign Up button. So the visitor can’t read the topic.

Screenshot 2022-07-29 at 2.14.48


I have max guest topic views (“Number of topic views until gate displays. After the gate first appears, it appears randomly between 1 and this number.”) set to 5, which means that the user can (4 times out of 5) go back to see the topic. It’s definitely more of a pain in the neck, so custom url enabled might lead more people to sign up! Thanks :slight_smile:

But to get round it completely, maybe there could be a new setting so that the guest gate appears every time after the max guest topic views is reached the first time. So, for instance, the gate would appear after 5 topic views, then every topic view thereafter. Maybe something like max guest topic views initial and max guest topic views subsequent (those names are too long, but you know what I mean).

1 Like

Is this still working properly? I’ve noticed that I’m not getting redirected to home anymore and the login or register modal can be closed making it easy for visitors to bypass the guest gate.

Hello, Yes, just tested now works fine for me.

1 Like

I reinstalled it and it works again. Maybe a caching issue on my side. Thanks.

1 Like

I’ve noticed that if you refresh the page the guest gate popup just disappears. Maybe this was always the case. Is there any way to prevent that?


Unfortunately I can’t repro it. :thinking: It works fine for me, always shows after I refresh the page. Which browser do you use? Can you share a screenshot from the setting you use and send me the forum link on pm or post here to check this? :slightly_smiling_face:

I usually use Chrome but noticed this today on Edge when trying it while logged out. I’ll send the details as soon as I can.

I really like this component, it’s one of the most useful in my opinion.
I would like to make the background of the screen completely dark because I realized that it is still possible to read the content
is there a css code that can do this
sorry I’m not a programmer


Hello Tiago,

Thank you :slightly_smiling_face:

The Guest Gate modal use the default modal backdrop. But I assume you only want to change the background opacity on Guest Gate modal. Unfortunately it is not possible to change the backdrop only on this specific modal with simple css.

But you can target the modal and add an extra layer background like this:

Create a new component or add it to an existing one Common / CSS section.

Full black background

#discourse-modal.gate {
  background-color: rgb(0, 0, 0);

But If you want to make a little transparency add an alpha value to it and you can change the opacity with the last number. 1 is full black 0 is transparent. Now I set this 0.65.

#discourse-modal.gate {
  background-color: rgba(0, 0, 0, 0.65);

its working, thank a lot @dodesz for your attention