Getting member blog posts on the main page

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.

  • Ray
    Posted at 16:29h, 21 August Reply

    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!

  • kunal
    Posted at 03:28h, 24 August Reply

    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?

  • Darren
    Posted at 14:00h, 25 August Reply

    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…

  • Vivian
    Posted at 12:46h, 26 August Reply

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

  • Danny
    Posted at 02:06h, 29 September Reply

    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 🙁

  • NiR
    Posted at 11:20h, 02 October Reply

    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
      Posted at 13:06h, 16 July Reply

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


  • Mike
    Posted at 15:05h, 08 October Reply

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

    • andrea
      Posted at 15:15h, 08 October Reply

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

      • Mike
        Posted at 13:06h, 23 October Reply

        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.

  • Mike
    Posted at 20:16h, 08 October Reply

    do you do web development?

  • Mike
    Posted at 20:17h, 08 October Reply

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

  • Jake Spurlock
    Posted at 13:28h, 21 October Reply

    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?

  • anthoin
    Posted at 11:22h, 13 November Reply

    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?

  • Dean Chugall
    Posted at 07:08h, 18 March Reply

    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!

  • r-a-y
    Posted at 20:34h, 19 March Reply

    Question for you guys, Andrea and Ron.

    I know this post was made back in August of last year, but in your 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

    • Ron
      Posted at 23:01h, 19 March Reply

      We use a specific category on the main blog posts.

    • andrea
      Posted at 07:35h, 20 March Reply

      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.

      • r-a-y
        Posted at 22:11h, 20 March Reply

        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.

  • nunzia rider
    Posted at 18:23h, 30 March Reply

    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.

    • andrea
      Posted at 18:39h, 30 March Reply

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

      • nunzia rider
        Posted at 18:53h, 30 March Reply

        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.

        • andrea
          Posted at 19:13h, 30 March Reply

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

          If not, they won’t get picked up.

          • nunzia rider
            Posted at 19:19h, 30 March

            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?

  • andrea
    Posted at 19:24h, 30 March Reply

    @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

  • Firefly
    Posted at 11:01h, 06 April Reply

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

  • mcfadone
    Posted at 13:44h, 16 June Reply

    How do you truncate the post on is this done through sitewide-tags?

    Thanks in advance!


    • andrea
      Posted at 15:07h, 16 June Reply

      It’s done via the template and the use of the_excerpt tag. Standard WP themeing.

  • Roy
    Posted at 09:17h, 14 July Reply

    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?

    • Ron
      Posted at 15:07h, 16 July Reply

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

      • Roy
        Posted at 04:21h, 17 July Reply

        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.

  • samir
    Posted at 02:58h, 31 August Reply

    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.


  • joh
    Posted at 23:45h, 14 September Reply

    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.

Post A Comment