Plugin Directory

Custom Field Taxonomies

Author: scribu

With this powerfull plugin you can enhance your site by making custom fields act like post tags.

Filter posts in new ways

Simple example:

http://yoursite.com/?price=1000 (displays posts which have a meta key 'price' with the value '1000')

Advanced example:

http://yoursite.com/category/special/?price-min=500&price-max=2000&color=white,green,blue (displays posts in the Special category, with a price between 500 and 2000 and one of these colors: white, green, blue)

Easily manage custom fields

On the settings page, besides choosing which custom fields should be searchable, you have several utilities for custom field maintenance:

  • search and replace through both custom field keys and custom field values
  • remove duplicate custom fields
  • add default values for certain custom field keys

Customize your theme with template tags

The plugin features several template tags that will help you display item information easily:

  • meta_filter_box() generates an advanced search box
  • meta_cloud() displays all the custom field values for a specific key (can also be restricted by post author)
  • the_meta_title() outputs a nice title for the search results page
  • all_meta_info() displays all the meta values for each post
  • get_linked_meta() works just like getpostmeta() with the difference that the values are links, not text
  • get_meta_taxonomies() returns all searchable custom fields as an associative array
  • is_meta() is a conditional tag that indicates if you're on a meta taxonomy page
  • meta_relevance() displays a percentage that indicates how many key=value pair matches a post has

You can find out more about the available template tags by looking in the template-tags.php file

Use the new theme template

If you want post sorted by metadata to be displayed differently you can: Copy meta.php from the plugin directory to your current theme directory. You can modify it to fit your theme as necessary.