Basic forum access/integration with Wordpress site

I have a Wordpress membership site using Memberpress to manage access.
We have created a Discourse forum and have installed wp-discourse plugin and connected them together.

However, I don’t see any docs describing how the forum is typically accessed from the Wordpress site. I don’t want people directed to the forum after login, but I’m assuming I can add a link on the menu and then have some verbiage for people who are not logged in, and then some verbiage and the link to the forum site that is visible when people are logged in with the proper membership level.

I’d appreciate any guidance for this. I notices in the various settings in the plugin that make it sound like posts might be embedded in the wordpress site. I don’t find a good explanation for what that might look like.

Thanks!
Evelyn

2 Likes

Have you seen this topic?:

2 Likes

Yes
I’ve followed the portions that seem applicable. I still don’t see information about how a person would connect the forum to a website… I guess just make it a link in the menu.
I’ve tried setting it up so the Wordpress site is the SSO for the forum, but I need to test more because when I go to the forum as a user that has a corresponding username account on the forum, it still wants me to login to the forum
It would be nice to see a sample of a website that links to a discourse forum.
Thanks!
Evelyn

Our main blog is one example:

3 Likes

Right. You’ll just need to edit your site to include a link to the forum in an appropriate place.

2 Likes

If you use the plugin to publish posts from WordPress to Discourse, you can have a link to the associated Discourse topic added to each WordPress post. To do this, select ‘Enable Discourse Comments’ on the plugin’s Commenting settings tab. When you select that option you will be given the choice to either display Discourse comments below the post, or just display a link to the comments.

When SSO is enabled, links to Discourse topics will default to being SSO login links. This means that when a user clicks on the link they will be automatically taken through the SSO login process and then redirected to the Discourse topic as a logged in user.

You can add a link to your forum to your WordPress site’s menu. When SSO is enabled, you can structure the link so that users are taken through the SSO login process when they click the link. See Create an SSO login link for details about how to structure the link. To add a link in this form on WordPress, you need to add a ‘Custom Link’ to the menu:

The example in my screenshot will log users into Discourse and redirect them to the forum’s homepage when they click the ‘forum’ link. To create a link that redirects users to a specific page on your forum, add a return_path query parameter to the URL. For example http://localhost:3000/session/sso?return_path=http://localhost:3000/c/fun.

4 Likes

Hi Simon,
Thanks! That is helpful.

Is there a doc that explains this?

http://localhost:3000/session/sso

If I want to use my actual URL (subdomain) for the forum instead of the localhost URL, will that work also?

We will not likely use posts on Wordpress to go to Discourse, but just have a link that takes members to the forum - but we want them to be logged in when they get there.

So that would mean all of the settings for comments and posts, etc. won’t apply in this case? We will just want to protect access to the forum using our Membership plugin. Comments and posts will not need to be synced.

Evelyn

Oh - sorry - I just clicked on the link you shared… I read too fast :slight_smile:
Evelyn

1 Like

The example I gave was not as clear as it could have been. I’ll edit it this week. The localhost:3000 domain is the domain of my local development site. You should replace that domain with the actual domain of your forum. For example, https://forum.example.com/session/sso

If this is the case, then you do not need to configure any of the Commenting or Publishing settings.

When SSO is enabled, all users on your WordPress site will be able to login to your Discourse forum. If you have users on WordPress who should not be allowed to create accounts on Discourse, you will need to add some code to a plugin or your site’s theme. The topic gives details about how to accomplish that: How to prevent some WP users from being able to login to Discourse.

2 Likes

Hi Simon,

I’ve set up this link.

I just want it to go to the top level. Later I might choose a specific Discourse page

I made sure that I left the box checked to allow direct login.
Currently when I login from either the wordpress site or the forum itself, it returns me to the wordpress site.

Help :slight_smile:
Evelyn

Hi,
I tried to turn off preview so you could actually see the link…
I’m trying to tweak it so you can see it.

*2ttps://forum.richarddolanmembers.com/session/sso?return_path=https://forum.richarddolanmembers.com/

Evelyn

Hi Simon,
We’re noticing that users with Admin privileges on Discourse are not seeing those permissions when logged in thru SSO. One of my collaborators is able to login with the SSO process but doesn’t see his admin privileges. I’m not able to login at all - still looking at why.
Is there a way to allow admin users to login directly to Discourse outside of SSO so they can manage the site? Or ensure that they have their full Discourse privileges when they login via the website SSO login?

Thanks!
Evelyn

Yes, if you lock yourself out of Discourse when configuring SSO, go to http://forum.example.com/u/admin-login. (Replace forum.example.com with your forum’s domain.) Enter your email address into the form on the page and click the link in the email that you are sent.

Once you have logged back into the site, check to see if a new account was created for him. To get logged into an existing account on Discourse, you’ll need to be using the same email address on WordPress as you do for the Discourse account.

Have a look at Debugging and fixing common SSO issues to see if it gives you any clues for solving your SSO problems. The issues you are having are probably related to what’s described in the ‘Solving require_activation SSO login issues’ section of that topic. I don’t think your site is using the default WordPress registration system, so new accounts that have been created since you installed the WP Discourse plugin will have the require_activation flag set to true in the SSO payload.

1 Like