• Home
  • About Mitch
  • Speaking
  • Articles
  • Contact
  • Home
  • About Mitch
  • Speaking
  • Articles
  • Contact

Digital Strategist

WordPress Developer

Content Creator

Unapologetic Punk

Mitch Canter

  • X
  • Bluesky
  • GitHub
  • Twitch
  • YouTube
  • LinkedIn
WordPress

50 Days to a Better Blog–Day 5: Tags vs Categories (and more)

CMDR Mitchcraft

Reading time: 3 minutes

This post is the fifth of an ongoing series entitled “50 Days to a Better WordPress Blog”.  During this time, Mitch will be providing small snippits of code, plugins, and things you can do to make your blog more attractive, attain new readers, and keep old ones coming back time and time again. You can see the entire series here.

I get a lot of questions when I’m speaking on the proper use of tags and categories when it comes to blogging.  How many is too many?  Can I put my post into multiple categories? Should I put my post into multiple categories? What do tags really do?

What’s the Difference?

This question stumps 9 out of every 10 new WordPress users, and even some old users who just never had the courage to ask when they were starting out.  What exactly is the difference between a category and a tag?  Let’s put it into perspective.

Let’s say you’re a potential employee looking at job prospects.  You absolutely want to work at “company x” no matter what that job is.  There’s everything from the CEO all the way down to the Janitor.  You love the company, know everything about it, and would feel very much at home with like-minded people who feel the same way.

That company is a category – it’s a general topic that a post would feel at home with other like-written posts.  Posts about recipes, marketing, or even “just for fun” stuff can all go in the general category.

But what’s this? You are a specialized individual – you can work in any company, as long as it’s the right job.  You could work for “company x” as a copywriter, but you’d be just as happy working for “company y” as a copywriter.  You are a specifically trained person with a specific focus.

The job position is a tag – it’s specific, and spans multiple categories.  You could have tagged a post with “Microsoft” or “Apple” and it be in the “business” category, the “technology category” or any number of other categories that mention either company.

Bottom line rule of thumb: No more than 1 category, no more than 5-7 tags (absolutely no more than 9 max).

Custom Taxonomies

If you feel like you need to split your post off into other categories, consider how you want to sort the content.  If you’re using categories to sort items such as “house size” (for all of you real estate agents) or “operating system”, then you may want to consider using a custom taxonomy.  This lets you define other sorting parameters to help you organize your data.  The code below is an example of a custom taxonomy:

add_action( 'init', 'register_my_taxonomies', 0 );

function register_my_taxonomies() {

	register_taxonomy(
		'os',
		array( 'post' ),
		array(
			'public' => true,                      'hierarchical' => true,                      'labels' => array(
				'name' => __( 'Operating Systems' ),
				'singular_name' => __( 'Operating System' )
			),
		)
	);
}

See the red text?  That controls whether the taxonomy will behave more like a tag (false) or a category (true).  If it behaves like a category, you can have nested, sub-categories.  Taxonomies (as of WordPress 3.1) also generate archive pages just like your standard category pages, and with some extra code you can even rewrite that archive value as well.  Justin Tadlock has a fantastic post on custom taxonomies, if you’re interested.

50 days, blogging, categories, custom taxonomies, Tags, WordPress
  • WP-Migrate-DB: Migrating a WordPress Installation in 5 Easy Steps

    WP-Migrate-DB: Migrating a WordPress Installation in 5 Easy Steps

    Reading time: 3 minutes

    If you’re a WordPress developer, migrating a finished development project can be one of the trickiest parts.  There’s moving parts in many places that have to be taken into consideration, and migration is (unfortunately) where WordPress actually could use some improvement.  However, it’s a necessary evil – one that I’ve done almost daily for a…

    WordPress
  • Tuesday Conversations: Your Favorite Plugins

    Tuesday Conversations: Your Favorite Plugins

    Reading time: 1 minute

    My old site was all about me writing stuff.  Don’t get me wrong, I love writing, but I know that I’m not the only guy out there doing this – I love learning from other people about things that I’d never known about otherwise.  Unfortunately, StumbleUpon is devoid of good WordPress articles (lots of theme…

    WordPress