WordPress custom fields give great flexibility to customize posts and pages, which let users create variables and add custom values to them. See detail on: The Power of WordPress Custom Fields. If you want to use Custom Field out of loop, than you must read this small article “WordPress: How to get custom fields outside the loop” which help you to do that.
This excellent WordPress feature must help a lot to bloggers, if they use for Categories and Tags (terms) and that can be achieable by using Category Meta plugin, so following are the useful features you can get from this plugin.
Insert Images to Category or Tag:
Whenever a category or tag are archived, an image will be appeared, because that image could be attached through custom field with that particular category or tag.
To Display Banners ads with Category or tag:
Bloggers can associate banner ads with category or tag by using custom field, because banner ad code could be stored in a custom field.
To View Stats of Category or tag:
You can track the number of visitors of category or tag pages, this feature is also available for pages and post by using plugins like WP-PostViews.
Right now a plugin “WP Category Meta” is not compatible with WordPress 3.2. This plugin adds an additional table “wp-termsmeta” in your database to add terms meta, As well you have to add PHP functions to update and access the terms meta as follow:
Installation Instruction:
- Unzip into your
/wp-content/plugins/
directory. If you’re uploading it make sure to upload the top-level folder. Don’t just upload all the php files and put them in/wp-content/plugins/
.- Activate the plugin through the ‘Plugins’ menu in WordPress
- Go to your Administration interface in the “Settings” menu a new “Category Meta” page is created. Configure the meta you want to use.
- go to your Administration interface, in the “Category” menu -> new fields are displayed in the category creation/modification form with the meta you configured.
- That’s it!
- you can use the folowing functions into your templates to retreive 1 meta:
if (function_exists('get_terms_meta')) { $metaValue = get_terms_meta($category_id, $meta_key); }
- you can use the folowing functions into your templates to retreive all meta:
if (function_exists('get_all_terms_meta')) { $metaList = get_all_terms_meta($category_id); }