Sitewide tags pages for WordPress MU

For WordPress MU only. My latest plugin is the sitewide tags pages plugin.

This is the initial release of a plugin that creates a set of pages like the Hot Topics pages. It’s a lot more simplistic, but by feeding posts into one blog it also creates a sitewide feed of all posts plus feeds of any tags and categories too.

Sitewide Tags Options

WordPress MU is a multi blog version of WordPress that runs on If you use the regular version of WordPress this plugin is not for you and you can ignore this post.

PS. In other MU news. Raanan has a new post on the Publisher Blog about Nationen! blog, a new Danish blog site based on WordPress MU that looks rather nice!
The site was developed by Incsub who are also the guys behind where you’ll probably find all sorts of useful nuggets of MU goodness on a regular basis!

By Donncha

Donncha Ó Caoimh is a software developer at Automattic and WordPress plugin developer. He posts photos at In Photos and can also be found on Twitter.

139 replies on “Sitewide tags pages for WordPress MU”

Hey Donncha,

I tired this plugin out, and it seems to be acting a bit crazy for me. I am using WPMu 1.5.1 and when I install the plugin in mu-plugins and write a post a blog within that environment the same post republished in that blog (in this cas) over a 1,000 times.

I can then find the lobal tags blog it created, but nothing is in thee. Moreover, when I delete the plugin from mu-plugins, the over 1,000 posts created are made “unublished” immediately, but stay in the database.

Just thought you might like to know as you develop this one, which is pretty awesome in its conception.

Jim – I just realised what it is causing that. You need to upgrade to WPMU trunk. I updated get_blog_details() so it’ll accept a blogname as well as a blog_id.

To make the plugin work on older MU installs, either copy get_blog_details() from wpmu-functions.php in trunk, or:
1. Get the blog_id of the tags blog.
2. add a site_option called “tags_blog_id” with that blog_id as value.

A big Doh! from me. Sorry!

[…] Sitewide tags pages for WordPress MU This is the initial release of a plugin that creates a set of pages like the Hot Topics pages. It’s a lot more simplistic, but by feeding posts into one blog it also creates a sitewide feed of all posts plus feeds of any tags and categorie (tags: wordpress wordpressmu tags plugin very+exciting+things) […]


0.2 worked like a charm for me. Thanks a lot, I can finally get rid of my old Dr. Mike hacked blog that hasn’t been updated for six months given the hacked WP Autoblog plugin breaks in all subsequent WP version. Whew, dodged another bullet.

Thanks for releasing this! We’ve been looking for this for a long time. Two questions:

Do you have inside info that isn’t ever going to release their code for site wide tags?

It looks like your plugin introduces a new field “sitewide tags” to supplement “tags”. Is this necessary?

Thanks again!

Mathew – it’s irrelevant if the code on is going to be released or not. The plugin isn’t hard to do if there are people interested in enough in doing it.

The plugin adds tags_blog, tags_blog_id and tags_blog_public site options. While you could probably do with only tags_blog_id and infer the rest of the information from that, it’s not a high priority for me.

Thanks for your reply and thanks again for contributing this to the community.

“Field” was a poor choice of words because I was actually talking about UI textfield and not the database field. That is, users will have two boxes to type tags into?

I thought I saw a screenshot showing an “Edit Post” page with two fields, one for “Tags” and one for “Sitewide Tags”. Or something like that. Looking again, I can’t find anything like that. I’m sorry, this might all have been my confusion. Thanks again for your contribution and I look forward to using it.

Doncha, I’ve been a long time lurker at the wpmu forums, always looking for a way to implement this for a little city blog I run. I’m crazy excited about the possibilities now that you’ve pumped out this plugin, considering most of the wpmu forum members don’t have the patience for noobs. I can’t wait to try it!
Is there a demo of it running now or should I just imagine it running like’s hot topics?

Rumblepup – thanks for commenting! There’s very little to show really. The plugin simply copies the posts to the named “tags” blog and uses whatever theme you want to display them.
It doesn’t do the nice tags heatmap on, yet.

Your theme could show the excerpts only. I considered adding a “Show only excerpts” option but I ran out of time.

There’s also an option to stop search engines indexing the tags page which is probably worth doing in some circumstances.

Last time I swear! LOL. I know that your plugin doesn’t handle this, but for the purposes of it’s use, do you have a tut or know of a tut on how to get the tags used in a subdomain to point to the tags in the tags sub? Like on It’s not that I wan’t to be exactly like, but I do see a benefit in this. If not, it’s so cool. You’ve given me and I’m sure a lot of other people sone of the best plugins for mu I’ve had the privilege of using. Thank you so much.

Problems with a “vhosts=no” install and version 0.2 of this plugin. I need to add a trailingslash to return the correct path in this line(73):

`$path = $current_site->path . $tags_blog . ‘/’;`

Otherwise every “Update” at wpmu-options.php creates another “tags” blog with a new id.

Thanks for this by the way.

I installed it on my site and it created the tags-Blog. Then I posted a new post in another blog on my site and this appeared in the tags-Blog as well.

Is there a possibility to bring all existing posts to the tags-Blog?

I “third” Andreas’s & Tsahi’s question/request. It would be great to be able to push the old posts into the Global Posts blog.

Re: Jim Groom, you’re lucky you only got 1,000 posts automatically created.

We got 27,000 posts created and it was impossible to delete them via the WPMU interface!!! At the same time, no new posts could be created manually. Disbaling this plugin immeidately fixed the problem. Headache or what!

Now I just need to work out what Donncha’s solution means – upgrade WPMU trunk? WTF?

Duncan – I presume you have phpmyadmin installed? Just bring up the posts and postmeta table for the tags blog and delete everything.

You should be running the latest MU anyway because of security concerns, but version 0.2 of the plugin will work in 2.5.1 and maybe earlier.

Hi Donncha, I’m running WPMU 1.5.1. Yes I do have phpmyadmin. I Haven’t upgraded to WPMU 2.6 yet as I understand its still not totally stable (but you’re the man to confirm that!)

Thanks for the reply!

MU 2.6 is perfectly stable, as good as 1.5.1. No, actually better! It also contains security fixes for at least 2 vulnerabilities that will be made public at some time.

That’s why I spent so long fixing bugs after WP 2.6 came out!

Usual cavaet that you should make a backup first of course.

Hi Donncha,
I’m the maintainer of the Role Manager Plugin for the “normal” WordPress and I ‘ve started a µ-project some weeks ago.

The plugin is realy nice. I’m a little bit confused about the name, because your plugin handle so much more as only tags 🙂
By the way, my “internal” name for your plugin is “summary” 🙂

On my µ-project I don’t using the primary blog (id=1) for blogging. The blog is for global information, help and so on. What are your thougths for using this blog as an archive? The most advantage I see, is to have a toplevel-domain with an sidewide feed in this case. And some more stuff similiar to are easy to implement on this way. I know, the plugin don’t support this in the moment, because the “primary blog” hasn’t a name. But I can send you a patch for this.

My next idea: posts from “not public blogs” should be suppressed and not inserted in the tags blog. I can send you an patch for this too.

Feel free to contact me by email to discuss this a little bit more in detail and sorry for my pour english.

Best regards, Thomas


Hey Thomas,

I am interested in doing exactly what you’re describing… having blog_ID=1 as the global repository.

Would you send me the 2 patches as well?

I guess for SEO the content of the primary blog in this case would not be indexed?

Everyone Else:

If you visit your subblogs and toggle the publication status and save, the posts ‘get pushed to the’ A global un/publish check box in the Manage Posts pane would be nice (like Joomla)

Using the Simple Tags plugin’s TagCloud shortcode, I was able to display the global tags on a page, then set that page to be the frontpage of the tags blog…

MuSnake – it’s probably better if Thomas sends on the patches to me so it’s easier for you to upgrade. Keep an eye on the download page for the new version!

I brought it to work with WPMU 1.5.1 & subdirectory install referring to the main blog but couldn´t continue to use it because it doesn´t convert the “[gallery]“-tag into the adequate IMG-tags.

If you use the “tags” blog in subdirectory install it always creates a new blog (irrespective if there is one) with save of the settings.

So I implemented feedwordpress + sitewidefeed instead (with some troubles & restrictions)…

Hi Donncha!

Many thanks for your response!

I installed the development version and after deleting the php-statement in line 36 and deleting the .’/’ in line 73 it works for the main blog.

I & my users (currently 2 of them) extensively use the “[gallery]“-feature in posts and what I require would be that in the post-content all [gallery]-statements are converted into the according HTML-tags & links to the source files when posted on the “Global posts”-Blog.

You find an example how the result should look like on my starting page:

With “sitewidefeed” I get this data for each Gallery in posts, put this feed to the main blog with feedwordpress (which doesn´t update properly) and have a theme for the main post that creates the post-preview (incl. pictures).

Your plugin could be a perfect solution and an easier and far more elegant than the current workaround.

F.e. automatic syndication in most cases doesn´t work with feedwordpress and so I´ve to update manually. Therefore the latest posts on my platform can wait hours to be put on the main page. – And it has taken me more than 20 hours work to come that far!

So your plugin has the potential to be very useful if it works with galleries!

For hints I would be very grateful because I don´t know enough of WPMU to find the right lever.

Kind regards,



Using the Dev version. I have a plugin that parses the post for images (attachments or custom fields etc). If it finds one, it generates the code to display it.

In making a copy of the post in the global (main) blog, the posts’ post_meta data does not appear to be mirrored. Below is my attempt to have the custom field ‘thumbnail’ transfered with the post… This does not work yet…

Around line 162…

` $p = wp_insert_post( $post );
add_post_meta( $p, “permalink”, $permalink );
// Add some of the custom field post meta,
// specifically the value of the key ‘thumbnail’
$myThumb = get_post_custom_values(‘thumbnail’, $p);
if ($myThumb)
add_post_meta( $p, “thumbnail”, $myThumb );

Something simple that I’ve overlooked?

I need a way to do something pretty quickly so any advice will be greatly appreciated.

Is there a way to create categories in sub blogs from the main blog or a central admin page. Ithere a way to manage the categories so that they are edited, created or deleted on existing blogs.

MuSnake – good idea, postmeta entries need to be copied too.

Justin – there’s no way to do that, but it’s not impossible to do in a plugin if you have the ability to code it.

Is it possible to also get comments for all the posts/pages? It would be great to also list the latest comments on my blog service.

Leave a Reply