WPMu: Sitewide Tags, Search, and Archive

Sitewide tags is a feature of UMW Blogs I spent a bit of time working on this past Summer. In fact, one particular workaround allows you to have a sitewide tag cloud as well as sitewide searching of blog posts and a dynamic archive of posts–all without any hacks to the core files of your WordPress Multi-User installation.

Image of UMW Blogs tag cloud

Keep in mind, however, that this is a hack and will be deprecated sometime soon with the recent introduction of tags (as opposed to categories which this hack is utilizing) with the WPMu 1.3 release. That said, given it enables a tag cloud, a centralized search for posts, and a dynamic archive might make it valuable while the WordPress Multi-User community gradually ramps up to the full potential of the new tagging feature.

Site-Wide Tags & Search
Creating site-wide tags using categories is a really intelligent work-around which–as an additional bonus–also allows for a centralized search of blog posts and a dynamic archive.

The basic concept of this hack is made possible through a very unintuitive move. That move is to create a separate, single installation of WordPress in a subdirectory (named “tags”–if you like) where your WordPress Multi-User installation lives. Once you’ve done this upload the same theme you are using on the main page for your WPMu installation and you have basically faked another part of your main site. After that use the “fixed” WP-Autoblog plugin (which pulls post feeds and their categories–the secret sauce!!!–from your WPMu install) and the Sitewide Tags Permalink Replace plugin (which redirects the permalinks in the single WP installation back to the WPMu posts) in the single WP installation to feed all the posts from your WPMu install into this single blog. You do this by placing the feed for all the posts on the WPMu install (this feed is made possible by ITDamager’s awesome WPMu Sitewide Feed plugin) into the settings for the WP-Autoblog plugin under the options tab.

Image of WP-Autoblog plugn settings
A look at the WP-Autoblog settings–really straightforward!

List of Plugins on single installation WP
Plugins on the single installation “tags” blog. Click for larger version

I am keeping this overview rather simple because the complex details for creating this sitewide tags hack were originally worked out in this thread on the Multi-User forums (peruse that for more granular information and alternative strategies). Even better, the hack is documented in a step-by-step tutorial on the WPMu Codex by mrjcleaver here.

These instructions are thorough, the only thing I would recommend different is to use the “full post” option in the WP-Autoblog settings rather than “excerpt” so that you can use the single installation as a way to search all posts (that’s right, sitewide tags enables a sitewide search–pretty sneaky sis).

As for the tagcloud, just pick your favorite plugin to display WP categories as a tagcloud. UMW Blogs is using the WordPress Heatmap Plugin that displays your categories on a page by including a PHP call in the page template that the plugin will provide you with. Parenthetical note here: I titled this page view so it wouldn’t be repetitive in the URL -so instead of http://umwblogs.org/tags/tags you have http://umwblogs.org/tags/view–I stole this idea from edublogs which is using this same workaround.

Finally, if you include the minor hack to your page template for the WP Heat Map plugin on a page within the single installation blog you have a tag cloud (well, technically a category cloud) on your WPMu site. You can see this in action here.

Sitewide Archive

It follows from such a hack that you would be able to create a more dynamic archive of all the posts in the single installation. So not only can you use the single installation to search all the blog posts, but also organize them for browsing by month or even show the last X number of posts. You can see an example of such an archive on UMW Blogs here. This was done by simply using a gently hacked archive template that comes stock with the MistyLook theme.

Image of UMW Blogs Archive Page

I guess this “tutorial” has been more a series of links to other cohesive How-Tos and innumerable plugins, but I felt it was necessary because I was somewhat thwarted this Summer by the lack of any organized approach to explaining and integrating such a key feature for tagging, searching, and organizing the content of a WPMu instance.

Please ask me questions about anything that is unclear, for I’d hate to see you waste the same amount of time I did 🙂

This entry was posted in tags, UMW Blogs and tagged , , , , , , , , , , . Bookmark the permalink.

7 Responses to WPMu: Sitewide Tags, Search, and Archive

  1. Chris Lott says:

    What a great hack in the most positive sense of the term: ingenious, a little unexected, and damn cool. WP-Hammer, you are truly rockin’ the casbah

  2. Hello, Mr. Groom,

    It’s great to see this post — I was just going to write up a similar thing on my blog about how to accomplish this exact goal in Drupal —

    1. On the admin screen, navigate to “Content Management –> Categories”.

    2. Click “Add Category” — complete and submit the form.

    3. For the tagcloud, install the Tagadelic module. This module generates a series of blocks/tagclouds that you can place on any page.

    4. Take an extra long lunch — heck, maybe knock off early, or watch a movie, or look through YouTube for 70’s era tv game ads — not much more to do here, as sitewide search (and search within terms) works out of the box — no tweaking necessary.

    5. Engage in thumb twiddling/making smart-ass comments on WP fanboy blogs.

    For the record, 4 and 5 are optional 🙂

    Cheers,

    Bill

  3. jimgroom says:

    @Chris: I’m just the messenger -Dr. Mike of the WPMu community is the genius.

    @Bill: I’ll get you yet, Fitzgerald!!!

  4. codersteve says:

    Just installed WPMU 1.3, now playing with the tags!

  5. jimgroom says:

    codersteve,

    Wow, that was quick. Let me know what you discover with tags, I am still experimenting with them as well.

  6. GSmith says:

    Does anyone have a copy of Dr. Mikes modified wp autoblog plugin? I cant find a copy anywhere.

    Thanks,
    G

  7. Pingback: links for 2009-05-31 - Patrick :)

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.