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 a DiscourseConnect 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
.