Formategory WordPress Plugin

Formategory is a plugin for WordPress that allows you to customize posts based on their categories. Just define a template for a category, and all of the posts in that category will be displayed according to the template.

The editing screen for a category template.

Use the buttons in the top-right meta box to insert placeholders for the post’s content; {{ the_content }} will be replaced by the post’s content, and {{ the_title }} will be replaced by the post’s title. Select some categories for the template, and after you save it, any posts in those categories will be instantly templated:

A templated post

An example of a templated post.

The “Category Templates” page in your dashboard allows you to manage your templates just like you manage your posts and pages:

Category template management

The category template management page.

To install, either search for “Formategory” on the Plugins installation in your WordPress dashboard, or download the .zip from Extend, choose “Add New” from the “Plugins” menu in your WordPress dashboard, and then upload the .zip file. Activate it, click the new “Category Templates” link in your dashboard’s menu, and create your first template.

Watch the Formategory section of my blog for information on updates to this plugin.

2 thoughts on “Formategory WordPress Plugin

  1. Very cool, and a plugin I’m going to have to give a go.

    One question though. What if a post is in multiple categories, either each with their own template or one with a template and one without?

    • If a post is in multiple categories, each category is checked for a template and applied to the post in sequence. Categories without templates don’t make a difference.

      For example, say you have a post that simply says “Merry Christmas!” and it is categorized under “Winter,” “Christmas,” and “Holidays.” “Christmas” has this template:

      {{ the_content }}
      It's the most wonderful time of the year!

      and “Winter” has this template:

      Here's a post about Winter, my favorite season:
      {{ the_content }}

      your post will be output like so:

      Here's a post about Winter, my favorite season:
      Merry Christmas!
      It's the most wonderful time of the year!

      The fact that “Holidays” doesn’t have a template doesn’t affect anything.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>