A guide to Series

Series is a plugin that creates a custom taxonomy called "series" for your blog. The purpose of this plugin is to allow you to easily link posts that are written as part of a series.

While the plugin is still in its early stages, I hope to continue building on top of the current code base to make this one of the most powerful series plugins available. I'm always open to new ideas on what could make the plugin better. If you have an idea, don't hesitate in contacting me with your proposal.

Note 1: This plugin is for WordPress 2.8+ only. It won't work on older versions.

Note 2: The term "series" is both singular and plural. Yep, it can be confusing, so just pay attention to the context of the sentences within this guide.

How to install the plugin

  1. Uzip the series.zip folder.
  2. Upload the series folder to your /wp-content/plugins directory.
  3. In your WordPress dashboard, head over to the Plugins section.
  4. Activate Series.

Using the plugin

There are actually several ways you can use this plugin or WordPress taxonomies in general. I'll walk you through some different scenarios to allow you to see some different uses.

Before getting into anything, you'll want to create some new series. You can do this in one of two ways:

  1. Click on the Series menu item (sub-menu item of Posts) and create a new series from here.
  2. Write a new post and look for the meta box labeled Series.

Once you've written added one or more series to a few posts, you'll want to display them. Since I have no clue how you want to do this, I'll try to make it easier by showing you some different methods in this guide.

Using the series widgets

I've packaged two separate widgets for you to use in displaying your series posts:

  1. Series: List Posts allows you to display a list of posts in any series of your choosing.
  2. Series: Related Posts shows posts in the same series as the current post (only displayed on single post views).

Each widget is pretty neat and adds another layer to this plugin. I've added several parameters to allow you to customize the output:

Shortcodes

Currently, there's only one shortcode packaged with this plugin, but I hope to add more after seeing what users demand. Shortcodes can be used in the WordPress post editor (by default).

The first (and only) shortcode is [the-series], which lists the series of the currently displayed post. You'd add it to your post editor like so:

[the-series]

It also accepts before, after, and separator parameters:

[the-series before="<p>Series: " separator=", " after="</p>"]

Listing a post's series

Most WordPress themes display a post's categories and tags, but they're not equipped to list your series. If you'd like to add this functionality, try this out within The Loop:

<?php echo get_the_term_list( $post->ID, 'series', 'Series: ', ', ', '' ); ?>

Showing your series in a term (tag) cloud

To show off all of your series terms you've created in a tag cloud, do this:

<?php wp_tag_cloud( array( 'taxonomy' => 'series' ) ); ?>

Get a series description

When you create a new series, you can add a series description for each individual series. To display this in your theme, use this code:

<?php echo term_description( $term_id, 'series' ); ?>

Series templates

When you create a new series, WordPress will automatically add a new archive to your site. It'll typically look something like http://yoursite.com/series/series-name. But, what the heck is displayed on this page? More than likely, it'll be something cooked up by your theme's archive.php template, which may make things kind of ugly if your theme doesn't support custom taxonomies in WordPress.

Never fear! I've included two templates for you to play around with. The first is for the WordPress Default theme and the second is for the Hybrid theme. You can find these templates in the default and hybrid folders packaged with the plugin.

To use one of these templates, just drop the template off in your theme's (or child theme's) directory. If you don't use one of those two themes, feel free to integrate the code into your current theme.

The template (for both) is named taxonomy-series.php. It's pretty important that you not change this. WordPress recognizes this as a legitimate template file and will only use it if it has that particular name.

More stuff

There's loads of things you can do with the series taxonomy, much more than I could possibly ever cover in this guide. I'll add more instructions as time passes on and I see what users need help with.

For now, please take some time to read through these two posts. They'll help you see why custom taxonomies are important and how the series plugin might be useful.

Plugin support

I run a WordPress community called Theme Hybrid, which is where I fully support all of my WordPress projects, including plugins. You can sign up for an account to get plugin support for a small yearly fee ($25 USD at the time of writing).

I know. I know. You might not want to pay for support, but just consider it a donation to the project. To continue making cool, GPL-licensed plugins and having the time to support them, I must pay the bills.

Copyright & license

Series is licensed under the GNU General Public License, version 2 (GPL).

This plugin is copyrighted to Justin Tadlock.

2009 © Justin Tadlock