Using Discourse profiles on Wordpress site

Hey,

We are developing a website that has different projects on it. Visitors of the website can join projects or support them in other ways. Now we’d like to show who is participating or who has contributed on the projects pages.

As we have a (very) active discourse forum with many nice profiles, we’d like to use these profiles.

Do you think it is doable to:

  1. Have WordPress recognize logged in Discourse users.
  • Add a button saying ‘I did this!’ to the project pages that connect to the discourse profile of the person clicking it.
  • show the avatar or name of the persons discourse profile in a box on the WordPress project page?

Or am I now constructing a Frankenstein website? :wink:

1 Like

It would be quite simple on logging into WordPress to get user info from Discourse and store it as user_metadata on Wordpress. That metadata could then be accessed in the WordPress theme.

It would be possible to get the user’s discourse user id, username, groups, badges, bio…

This could either be added to the wp-discourse plugin, or you could do it in your theme by hooking into the ‘wp_login’ action.

4 Likes