Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Another great way to add a layer of social interactivity to your WordPress Multisite installation is by aggregating comments that are happening all across your networked sites. Now, you can do this manually through PHP, but that could take a lot of time. So why not I just use a plug-in? That's exactly what I'm going to do in this movie. I'll show you how to aggregate comments sitewide into one centralized location utilizing an awesome plug-in from the wpmudev.org web site. The first thing you'll need to do is go over to wpmudev.org and set up a brand new account.
It's a premium site, so it's going to cost a little bit of money, but for the amount of plug-ins you get, its well worth it. Once you've created your new account, you're simply going to look for plug-in called Recent Global Comments. Once you find that plug-in, go ahead and install it. I'll show you where in just a second. Let's go over to the Plugins > Installed Plugins. Alongside of that plug-in, you'll also need two other plug-ins for it to function correctly. One is called Avatars For Multisite and the other is called Comment Indexer, and if I scroll down you'll see here's the Recent Global Comments Widget.
Once all three of those are installed, you're ready to start aggregating comments from across your sites. Let's take a look at how we can use that. I'll go up to My Sites, go down to the main domain, choose Dashboard. Once I get to the Dashboard, you'll notice that in the Appearance section, I can go to Widgets. Once I'm inside of the Widgets, I simply look for Recent Global Comments over here on the left and I drag it to the area where I want those to appear. In this case, I'll move it to Page Pages.
I'll scroll down and you can see that I can configure a Title-- In this case I called it What Folks are Talking About--the number of comments that I show, the content characters-- that's how many characters of the comment are displayed--whether or not want to show the avatar of the person, and how big the avatar is going to be. In this case, I think I'll shrink it down to 16 pixels to make it a little bit more compact, then I'll click Save. It should be noted that only comments that are created after you activate these plug-ins will be indexed. It cannot index older comments. So if this is something that's really important to you, you should have this installed as one of your first plug- ins inside of WordPress Multisite.
It'll just make it easier on you. Now, once I have that configured, I can go up and I can visit my site. Inside of my site, once I get to a page like you see here, I can see What Folks are Talking About! As you can see, I've only got one comment that's been posted since I activated those plug-ins. There are a lot more comments on my site, but only this one gets indexed because it was posted after I activated the plug-in. If I choose to hit the More link right here, it takes me to that post on that site and I can scroll down and view that comment. Pretty cool! Now, what if I wanted to enable sitewide comments on every single one of my sites? That's kind of a different story because by default this plug-in only allows you to add that Recent Comments widget to your main web site.
In order to change that, you have to go into the PHP of the plug-in. So I'll jump over into my code editing application for a minute, and inside of your WordPress installation you'll need to find the wp-content folder > plug-ins and then find the recent global comments widget folder. Inside of recent global comments widget, find recent-global-comments-widget.php. Once you find that, you're going to scroll down until you find line 34 and this is where it tells you that Recent Global Comments Widget is only on the main blog.
When this value is set to yes, that means it's only displaying on that one single blog. You can change it to no, as it says here. Once you say no, you've enabled that widget on all of your sites. Let's do that now. Once you type in no, save it, and it should be ready to go. Let's go back into my WordPress installation. I'll close up this site and I'll move over into My Sites. Let's go to the Tutorials blog. Go to the Dashboard. Once I'm in the Tutorials blog, I go to the Appearance > Widgets.
Inside of the Widget area I have Recent Global Comments. Let's add this to Single Post Pages. Here, I can call it whatever I want. I'll call it Join the Conversation this time. Number of comments, I'll do 3. Content Characters, 50 is fine. Do I want to show Avatars? Absolutely. Avatar Size, let's change this one to 32 pixels. Then I'll choose Save. Once that saved, I'll go visit the site.
Once I'm on the site, I need to go and find a single post, I'll choose this one here. On the single post page, Join the Conversation. There is the comment and a link to it, as well as my avatar in 32 pixel format. Pretty cool! Now let's go ahead and close this up and I can go back to each one of my individual sites now and customize the way all of the comments are displayed dynamically in the sidebar. It's totally up to you, but it's a great way to add that little something extra or a social aspect to your blog or web site.
Get unlimited access to all courses for just $25/month.Become a member
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.