How to Use the Tribe Community Platform as Your WordPress Comments System

I decided to use Tribe as the community platform driving the Bentodesk Community last week. So far, I love it!

As a bonus, I determined how I could use Tribe as the comments system for our blog. Tribe has not completed their promised WordPress integration yet, but there’s still a way to manually integrate many aspects of the Tribe platform into your WordPress website.

Why use the Tribe Community Platform for comments instead of the built-in WordPress comments system? I’m glad you asked!

Spam is a serious challenge to deal with. Sure, I could enable the “Users must be registered and logged in to comment” option within the WordPress comments system. That would prevent a good deal of spam. And I could fine tune the “Comment Moderation” and “Comment Blocklist” sections within the WordPress discussion settings. I could even subscribe to an anti-spam service such as Akismet. However, these options add complexity and cost. We’re already managing spam and moderating comments within the Tribe Community Platform. By using Tribe for our WordPress comments system, we only have to moderate content within one platform.

Also, if I used the built-in WordPress comments system and required users to register before commenting, not only would they have a www.bentodesk.com account, but they would also need a separate account to login to the Bentodesk Community. Why? The user database for our main website and the user database for our community are not the same. This would create confusion for Bentodesk visitors. “Why do I need an account to comment on blogs and a different account to interact with the Bentodesk Community?” they might ask. There may be times when you decide to use an additional system in your business that requires your customers to create an additional account. For example, the Bentodesk Client Portal does not use the same user database as the Bentodesk Community. But the less accounts your customers need, the better. Using Tribe as our comments system reduces the number of accounts our customers need to interact with us.

Additionally, we want our blog readers to engage with the Bentodesk Community. By requiring Bentodesk blog readers to sign up for the Bentodesk Community to comment on blog posts, and by having blog post comments show up within the community, we’re creating a cohesive environment for all Bentodesk visitors to interact with one another.

Now that we’ve covered why you might want to use the Tribe Community Platform as your WordPress comments system, here’s how to do it. Unfortunately, it is not an automated process and does require a bit of manual labor. But this labor does not take a lot of time and effort. To make this happen, we’re going to utilize Tribe widgets. Tribe documents all of their various widgets and how to use them here.

Before we begin, since we’re not going to use the built-in WordPress comments system, we should disable it. The easiest way to do so is by installing the Disable Comments plugin by Samir Shah. You can install it right from the WordPress Plugin Directory. Once installed and activated, Disable Comments can be used to disable all comment-related controls and settings in WordPress with its “Everywhere” option. This is the option we’re using on the Bentodesk WordPress install. It disables the ability to comment anywhere on your WordPress website. It even hides the Comments section in your dashboard.

Next, you will need a way to add code to the <head> tag of your website. One way to do this is with the Head, Footer and Post Injections plugin by Stefano Lissa. This plugin is also available from the WordPress Plugin Directory.

As Tribe recommends, we’re going to use the Tribe JavaScript Snippet. Using the Tribe JavaScript Snippet is the preferred method instead of using iframes because it will automate most of the formatting process. In order to use the Tribe JavaScript Snippet, the following script needs to be pasted into our website’s <head> tag.

<!-- Tribe Tag -->
<script>
  (function(t,r,i,b,e){
    if(typeof t.Tribe==='function'){t.Tribe('reload',{portal:i});}
    else{b=function(){b.r(arguments);};b.q=[];b.r=function(args){b.q.push(args);};
    t.Tribe=b; e=r.createElement('script');e.type='text/javascript';e.async=true;
    e.src=i+'/widget/v1/main.js?t='+Math.ceil(new Date() / 3e5) * 3e5;
    var x=r.getElementsByTagName('script')[0];x.parentNode.insertBefore(e,x);
    t.Tribe('boot',{portal:i});}
  })(window,document,'{YourCommunityAddress}');
</script>

Now that you have the “Head, Footer and Post Injections” plugin installed, go to your WordPress dashboard, hover over the “Settings” menu, and click on “Header and Footer.”

Copy and paste the script above into the “<HEAD> PAGE SECTION INJECTION” field. We need to replace {YourCommunityAddress} in the second to last line with the complete URL of your community. For example, I put the URL of the Bentodesk Community: https://community.bentodesk.com. You will need to put the URL of your community here.

Once you’ve completed editing your script by inserting your community’s URL, scroll down and click the save button to save your changes. If you’re using a caching plugin, you should clear your cache at this time to ensure that the new <head> tag will be used immediately.

Great! The Tribe JavaScript Snippet is now in place and you can start using Tribe widgets all over your website. But how would you use a Tribe widget for comments in blog posts?

For this, we’re going to use the Tribe post widget. The post widget can be used to embed any post from your Tribe community into a page on your website. To insert a Tribe post widget into a page on your website, you need to paste this script as HTML into your blog post or page:

<div id="post-widget"></div>
<script>
  window.Tribe('post', {
    id: 'post-widget',     
    postId: '5e34aa3949858b2fdcba9ef7',
    components: ['topics', 'post', 'share', 'responses']
  })
</script>

Please note that the post ID number “5e34aa3949858b2fdcba9ef7” in the script above is just an example. We need to replace it with the actual post ID of the post in our Tribe community that we want embedded in our blog post or page.

First, we need to create a “Blog” post in our Tribe community. For Bentodesk, I’ve created a group in the Bentodesk Community for the sole purpose of creating discussions regarding Bentodesk blog posts. For each blog post on the Bentodesk blog, we create a “Blog” post in our Tribe community that includes the same title as our actual blog post on our website. For the body, we include a link to the blog post itself. Then we publish it to the Tribe community. This community “Blog” post will serve as the home of the comments for the actual blog post we’re going to embed it into.

Once the community “Blog” post is published to your Tribe community, click on the title of the community “Blog” post that you just published. It will take you to the community “Blog” post page. This page has the 24-digit post ID number at the end of the URL. Copy that 24-digit post ID.

Now that we have the post ID, we’re going to insert it into the script that we pasted into our page earlier.

Your script is complete! Update your page or blog post and your Tribe “Blog” post will be embedded right where you inserted the Tribe post widget script. If the person visiting your blog post or page is already a member of your Tribe community and is logged in, this is what they will see:

Your visitors will be able to interact with your community post just like they would if they were at your community page. They can reply, like, and share your post on various social platforms. The Tribe Community Platform has an automated “Related Blogs” feature that will show links to similar community “Blog” posts. As you use continue to embed more post widgets into your website, and as your website visitors use them over time, the “Related Blogs” section will fill in automatically.

What if your website visitor isn’t a member of your community yet? This is what the embedded post widget will look like:

Perfect! Your visitors see the option to “Sign Up Now” for your community. If you have the Tribe Cookie Consent application turned on, they’ll even see this pop up at the bottom of your embedded widget.

Tribe widgets are a fantastic way to incorporate aspects of your community into your website. Using Tribe post widgets for comments on your blog posts does require some manual labor. But once you’re used to the process, this labor of love is worth the value it will bring to your community and your website.