Custom Field Taxonomies

Alert: This plugin is no longer under active development, because I left WordPress.

Custom Field Taxonomies: Version 2.0

As promised, this plugin is now a utility to convert custom fields into terms in a taxonomy.

If you go to WP-Admin -> Tools, you’ll see this at the bottom:

admin interface

Custom Field Taxonomies: Change of direction

When this plugin was first released, custom taxonomies were practically unheard of (WordPress 2.7). Custom fields were already there and convenient to use, so it was easier at the time to use custom fields as if they were tags.

Since WP 2.9, that is no longer the case: with a single line of code, you can get a separate set of tags that you can manage, assign to posts and group posts by, right away.

So, if you’re starting a new project, instead of using Custom Field Taxonomies, I recommend you use the following plugins to achieve the same functionality:

Instead of trying to emulate native taxonomies, this plugin will be transformed into a simple utility that converts custom fields to taxonomy terms.

Custom Field Taxonomies: Version 1.4

This release is sponsored by Dustin Dempsey, from Playforward Designs.


A common need for sites using Custom Field Taxonomies is a query like this:


This would show posts having a custom field ‘price’ with a value between 300 and 500.

Since version 1.4, this is possible with all meta taxonomies, numeric or not. You can also use price-min withouth price-max and vice-versa.

Security enhancements

While working on this release, I have found several potential security holes. These are all corrected now.

If you are using a previous version of the plugin, please update as soon as possible!

Custom Field Taxonomies: Version 1.3

This version adds two query options:

OR query


will match all posts that have the fruit field set to apple OR orange OR pair.

AND query


will match posts that have 3 color fields: one with red, one with orange and one wih yellow.

These capabilities are disabled by default. Before you enable them from Posts -> CF Taxnomies, a word of caution:

If some of your field values have commas ‘,’ character in them, don’t enable the OR query.

Also, if some of the field values have spaces ‘ ‘ in them, don’t enable the AND query.

Currently, you can’t enable both the AND query and the “Show posts that don’t match all key=value pairs” option. This will probably be fixed in the future.

Custom Field Taxonomies: Version 1.2

Another substantial update for y’all:

Revamped Admin Page

New CFT Admin Page
The new admin page is built up entirely of shiny 2.7 style boxes. They work just like the ones on your dashboard.

The admin page has been moved to Posts -> CF Taxonomies for easier access. There is also a new feature to add default values.

Enhanced sorting

Version 1.1 introduced an option to display posts with a relevance less than 100%. Now you have an extra option to also adjust the relevance based on the order of the query vars in the URL.

For example, if your URL is, posts that don’t have bar=yyy, but have foo=xxx will rank higher than those that have bar=yyy but don’t have foo=xxx.

Important bugfix

In earlier version, if you used query_posts() anywhere in the template file that was used by the plugin, you would get all kinds of errors. Not anymore:

Now you can use query_posts() and even have multiple loops on the same page and CFT will only modify the main loop.

Custom Field Taxonomies: Version 1.1

This version brings several important new features:

Wildcard support* will fetch all posts that have a meta key field with any value beginning with abc: ‘abc’, ‘abcd’ etc.

The ‘’ character can appear multiple times, anywhere: **ab*c*&another=foo*bar


There’s a new checkbox in the settings page that allow the following behaviour: will fetch posts that have at least one of those key=value pairs.

There is also a new template tag that displays the relevance for each post: meta_relevance()

Enhanced search & replace

Now you can select in which meta taxonomy you want values replaced. This allows for better control over your custom fields.

Important: The parameters for meta_cloud() have changed. Check template-tags.php to learn more.

Custom Field Taxonomies: Version 1.0

Several improvements  in this release. Be sure to upgrade.

Custom Field Taxonomies: Version 0.9

Meta Filter (search box)

In version 0.9 I finally included an advanced meta search box. It can be easily styled and you can even have several boxes on the same page.

The code to display it is simple: <?php meta_filter_box<!---->() ?>.

If you don’t want to use a certain key as a filter, you can write

<?php meta_filter_box($exclude = array('key1', 'key2')) ?>

Make sure your theme has wp_footer() written somewhere in footer.php.

Custom Field Taxonomies: Version 0.8

Custom Field Management

Another update for this plugin: Added a custom field management section in which you can replace custom field keys or custom field values. Maybe an option to delete certain custom fields based on key or value? We’ll see.

Custom Field Taxonomies: Version 0.7

This version adds multiple key=value check, which means that now you can have URLs like this:

<a href=";key1=valueA&#038;key2=valueB" rel="nofollow">;key1=valueA&#038;key2=valueB</a>...

<a href=";key2=valueB" rel="nofollow">;key2=valueB</a>...

I’ve also added autosuggest to the input fields in the Settings Page which will give suggestions based on the existing meta keys on your site.

Any ideas for an interface to construct such URLs are welcome (an advanced search box? etc).

Custom Field Taxonomies: Version 0.6

By popular demand, this plugin now supports URLs like this:

The template tags were updated to reflect this posibility. Also, an extra template tag was added:

all_meta_info() displays all available data for the current post.

PHP5 is required.

Custom Field Taxonomies: Version 0.5

Custom Field Taxonomies is a plugin that lets you use post metadata as ad-hoc taxonomies.

Register taxonomy

For each taxonomy, you have

It also has a nice settings page where you can define which fields to be used as taxonomies.

PHP5 is required.