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:
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.
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-max and vice-versa.
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!
This version adds two query options:
will match all posts that have the fruit field set to apple OR orange OR pair.
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.
Another substantial update for y’all:
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.
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 http://example.com?foo=xxx&bar=yyy, posts that don’t have
bar=yyy, but have
foo=xxx will rank higher than those that have
bar=yyy but don’t have
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.
This version brings several important new features:
http://example.com/?field=abc* 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: *http://example.com/?field=*ab*c*&another=foo*bar
There’s a new checkbox in the settings page that allow the following behaviour:
http://example.com/?key1=value1&key2=value2 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:
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.
Several improvements in this release. Be sure to upgrade.
meta_filter_box() now comes with autosuggest.
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.
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.
This version adds multiple key=value check, which means that now you can have URLs like this:
<a href="http://yoursite.com/?s=anything&key1=valueA&key2=valueB" rel="nofollow">http://yoursite.com/?s=anything&key1=valueA&key2=valueB</a>...
<a href="http://yoursite.com/category/news/?key1=valueA&key2=valueB" rel="nofollow">http://yoursite.com/category/news/?key1=valueA&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).
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 is a plugin that lets you use post metadata as ad-hoc taxonomies.
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.