WordPress plugin intelligence profile

TDO Tag Fixes

Some fixes and extensions for Wordpress tags such as a tag cloud using only tags found in a specific category and also tag and category intersection.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 2.5
Current version0.5
WordPress coverageTested up to WordPress 2.5
Minimum stackWP 2.3 · PHP —
Directory statusactive
Last directory update4 Jul 200818y ago
Active installations90Adoption metric — not a quality score
WordPress.org rating5.0 / 5 from 1 ratings
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records TDO Tag Fixes version 0.5 as active, updated 18y ago and tested up to WordPress 2.5.

Overview

About this plugin

This plugin is simply intended as an example of how to implement tag and category intersections. However it has got a bit more feature-heavy recently. Please feel free to re-use the code in your plugin.

This plugin is based on information found here.

5 enables true ‘or’ tag intersection when using a category. It wasn’t working prior to this (and no-one noticed). Thanks to Joel Giddey for spotting it.

3 introduced native tagging support, which is rather nifty.

But did you know that you can display multiple tags in the one archive and even generate a feed for that?

  • “ http://your-blog-uri/?tag=tag1,tag2 ” this would get all the posts tagged with tag1 or tag2.
  • “ http://your-blog-uri/?tag=tag1+tag2 ” this would get all the posts tagged with tag1 and tag2
  • “ http://your-blog-uri/?tag=tag1,tag2&feed=rss ” this would get you an RSS feed for all the posts tagged with tag1 or tag2

Neat huh? But did you notice that on the generated tag page you see only one tag listed in the header? This function fixes that and displays all tags used to generate that tag archive.

It does this by silently modifying the single_tag_title template tag. It’ll even work on the RSS feed generated by that page!

What would be also be cool is to be able to intersect categories and tags so you could grab posts with tags from a specific category for example?

With this plugin you can. It’s not perfect however. It only allows intersection between a single category and one or more tags.

5.

So go to one of your category pages. tdo_tag=a_tag “. If your not using permalinks then you can just use “ &tdo_tag=a_tag “.

You must use the tag slug, not the full tag name. You can use multiple tags as above using “,” and “+”.

  • Example not using fancy permalinks: “ http://your-blog-uri/?cat=35&tdo_tag=tag1,tag2 ” this would get all posts in category with id 35 and tagged with either tag1 or tag2.
  • Example using fancy permalinks: “ http://your-blog-uri/category/mycategory/?tdo_tag=tag1+tag2 ” this would get all posts in the category “mycategory” and tagged with both tag1 and tag2.

This plugin uses this intersection code to automatically modify the built-in tag cloud template tag wp_tag_cloud so that if it is used on a category archive, it shows only the tags within that category. You can then click on a tag in that tag cloud and it will get the posts for in that category that tagged with that tag. (You can disable this and just use the specific template as you need).

Some more tag tricks

If you want to sort results on page generated by using the tdo_tag you can just append orderby and order to the URL. For example:

cat=35&tdo_tag=tag1,tag2&orderby=title&order=asc “

Thanks to Tobias Ross who figured this out. You could of course stick this in the fancy permalink if you’re okay with doing a little hacking.

Version History

v0.5: 4th July 2008

  • Fixed a potential problem with global variables
  • The “or” tag functionality for tags with a category didn’t work. Fixed.

v0.4: 8th April 2008

  • The tag cloud had a “small” bug, it only gathered the tags from the posts on the first page of the category, not all the posts on the category! Doh. Thanks to Tobias Ross for helping me to get to the bottom of it.

v0.3: 7th April 2008

  • Small bug fixed. Setting $tdotf_fix_tag_cloud_auto to false did not deactivate the automatic tag cloud modification.
  • Tag cloud now properly supports exclude, include and number arguments
  • New template tag: tdotf_the_tags
  • A basic permalink redirection (as requested)

v0.2: 20th December 2007

  • Added a tag cloud based on the built-in tag cloud that shows tags from a single category.

v0.1: 6th December 2007

  • First release
WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • tag cloud
  • fixes
  • intersection
  • tags
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 2.5

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 2.5.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to2.5
Minimum requirementsWordPress 2.3 · PHP not listed
Update activity4 Jul 200818y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.