Getting member blog posts on the main page

I’ve answered this one quite a few times in the past couple of weeks and realized that I don’t have a posts specifically for this subject. It’s buried in other posts. :)

There are a few different ways to pull in these posts, and none of them are theme issues. They are done entirely with plugins. Of course, I have a couple of favorites, and your mileage may vary, depending on how you want to present the posts.

AHP Sitewide Recent posts – this plugin goes in the mu-plugins folder and has a template tag that you need to paste in your main blog’s theme file. Usually in the home.php, if there is one. This is good if you just want a brief list, maybe with an excerpt. As an added bonus, you can also show the users’ Gravatar. It can be easily adapted to use a local avatar if you use one of the many avatar plugins around.

This plugin will not show in the plugins list and does not create a menu in the backend. It’s purely one for adding code to your template.

Maybe you want a small box of recent posts, but are wary of messing around with code. Ada A Blog Recent Posts Widget does a similar thing, but in a widget. Then you can place it anywhere in your theme that is widgetized. You wil only see this plugin in your widgets area.

Both of these plugins step through the database and are just fine on smaller sites. If you have a larger site, lots of traffic, and need way more flexibility, then we get to my all-time fave, Sitewide Tags. The plugin name is a bit of a misnomer, as it was originally was for setting up sitewide tags, but the way it does so means it can be used for so much more. Donncha, the main dev for wordpressmu, developed this plugin for the community in what little spare time he has.

Basically, this plugin creates a separate tags blog. It makes a copy of each blog post on the entire system and puts it in this blog. From there, the visitor can search, pick tags, find common categories and more. The posts themselves link back to the originating blog.

With a small change to this plugin’s options, found under Site Admin -> Options, way at the bottom, you can direct it to use the main blog. The main blog will still function as a blog. We’ve used it this way on HomeschoolJournal. Then, we can use the single blog widget like Search and Recent posts to find global content – because it’s reproduced in one blog.

A couple of minor tweaks may also be desired. While sitewide tags pulls the posts, it does not pull the comments count or custom fields. Here’s a forum thread to help with the custom fields. And here’s a post to help with getting the sitewide comments.

About andrea

City kid turned country wife, obsessive crafter.

Comments

  1. Thanks for the links to the mods of Sitewide Tags, Andrea!

    I’ve been meaning to install Sitewide Tags on a sub-blog to test this out.

    Thanks again!

  2. Thanks for the article Andrea.

    I have been using Site Wide Tags for about a week now and it works very well. The only problem is that it does not pull in posts that were added before the plugin was installed. Do you know of any way to pull in old posts without manually updating each post?

  3. I like the execution of the Sitewide Tags on HomeSchoolJournal. It looks great!

    I think it would be nice to be able to display the Blog’s Title alongside the author. Has anyone found a way to do that? Guess I’d better go google that…

  4. I can see you wrote about it :D! You are such a godsend.

  5. Trying HARD to get the global blog to work on my WPMU, but nothing is showing up… I can’t find any detailed tutorial on this online :(

  6. i tried to use AHP Sitewide Recent posts. but i don have any home.php im usinh thesis theme for wpmu. can anybody tell me what is the easy solution to show userrecent post on my main page?

    • yunieskid says:

      Hello NiR, i did want to use AHP but i only see it on the site for premium users and i cannot create an account there because of my country, but instead i used the AdaABlog it works fine, you can download it here http://1uthavi.adadaa.com/ada-wpmu-recent-posts-widget/
      ah if could conctact you to send me the ahp plugin it would be a geat favor, becuase i could not solve all what i need with the ada but maybe for you is al what you need.

      greetings

  7. How do I put categories on my home page for the site wide blogs?

    • It depends – do you mean display the category the post was posted in, or group the blogs themselves by category?

      • First, I would like to group all new post from all blogs on my bpress mainsite under their posting categories. So to have a sitewide, global, categories aggregator for all posts.

        Second I would like to be able to categories all blogs.

        It would be nice with heirarch categories.

  8. do you do web development?

  9. do you do any web development. I’m trying to get a site wide category posting on the front page.

  10. What about going the other way, say you want to put posts from the main site onto a child site. Is there an easy way to do that?

  11. I am creating a site using wordpress mu and have implemented sitewide tags and it seems to work.

    There is only one problem. I create a post in one of the blogs and include an image in the post but the image does not appear in the listing of aggregated posts on the main site homepage. I realise it is possible to include a gravitar however this is not what I need.

    Is there a plugin I can use that will work in conjunction with sitewide tags to achieve the above or do I need to include specific code?

  12. Please i can`t pull comment in main wpmu blog.
    I tried the instructions but can not no way to succeed.
    Please if you can help me!

  13. Question for you guys, Andrea and Ron.

    I know this post was made back in August of last year, but in your HomeSchoolJournal.net example, you’re using Sitewide tags as the main blog.

    How would you separate blog content made on the main blog from the rest of the blogs?

    Maybe as a new page on the main blog with a custom page template? But what code would go in this page template?

    I guess I should try this on a test box, but I’m a little too lazy :p

    • We use a specific category on the main blog posts.

    • So like Ron said, use a specific category for posts on the main blog. Or, the other way is to separate the content by author.

      Then you’d just use regular WordPress template tricks to do things like display one category or author posts on the main page.

      • Gotcha guys!
        Thanks for the info.

        I think I’m going to opt to use SWT on a sub-blog rather than the main one.

  14. try as i might, i’m not able to get the sitewide tags plugin to work. if i choose the global tags blog, it will create the blog, but does not pull blog posts into it from the member sites. likewise, when i choose to use the main page (which is what i really want to do), no posts appear.

    i’d also like to make the members sites categories on the main page. how would that work?

    i know this is an old post, but this is the closest i could get to figuring out why this thing isn’t working for me when it seems to work for others. thanks.

    • It will not go back and retrieve the posts that are already there. It will only grab new posts as they occur.

      • Yeah, I understand that. But it’s not catching posts when they’re posted, either with the global tags blog or the use main page thing. i can’t figure what i’m doing wrong.

        • Are the blogs each marked as Public under Settings -> Privacy?

          If not, they won’t get picked up.

          • yup. i was initially using a non-wpmu theme, but i changed that. i am completely baffled.

            i’m using subdomains … it does work with subdomains, right?

  15. @nunzi rider – yep, sure does. Got a link? Wanna email a screenshot of the options you’ve set?

    andrea at ron and andrea dot com

  16. Guys, please give some instructions for the comments code. I can’t make it work :(

  17. How do you truncate the post on http://homeschooljournal.net/? is this done through sitewide-tags?

    Thanks in advance!

    Mike

  18. I’ve never used MU but five WP installations instead. Now I have a 3.0 network and figured I can now have the recent posts of all subsites in a widget on the index. I have looked around, tried a few plugins, but all to no avail. The plugins either not work or are only available to WP Mu Devs. Can’t this just be done with a little bit of code in a text widget or is there a plugin that I overlooked?

    • How about the sitewide tags plugin (see the link in the post)?

      • I’ve tried it, it seemed perfect for a moment, but then I noticed that it actually publishes the entire post including categories and all puts it in the database of the news section. That’s a slight case of overbombing. Like the sidebar widget I only need a post title that links to the actual post.

  19. Hi Andrea,

    Thanks for such a beautiful article. i am using sitewide tags plugin. But i found that it lacks proper usage documentation.

    I am trying to get it work on my website. but so far i am not getting any success please try to help me out.

    Regards,
    Sam.

  20. hello thanks for this!
    it works which is great but i was hoping to implement something where only if the user tags the post with a specific tag or category eg front_page would it be displayed on the front page – would there be an (easy) way to do this??
    thanks for your help.
    :)