• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WPArena

WPArena

WPArena is a premium online resource site of WordPress and is focused on providing excellent WordPress Tutorials, Guides, Tips, and Collections.

  • News
    • Opinion
  • Tutorials
  • Reviews
    • Themes
    • Plugins
  • Comparisons
  • Collections
    • Education Themes
    • Genesis Child Themes
    • Best Responsive Themes
    • Medical WordPress Themes
    • Finance & Business Themes
    • Crowdfunding Themes
  • Resources
    • Inspiration
  • Services
WPArena » Tutorials
Tutorials

How to add Custom Fields [metadata] for categories and tags [terms]

Avatar of Noor Mustafa Raza Noor Mustafa Raza Updated: October 24, 2017

FacebookTweetPinLinkedInEmailPrint

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:

251px-Html-tag-italicized

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:

banner-advertising

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:

page3_blog_entry106-web_counter_stats

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:

sculture_wolf

  1. 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/.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Go to your Administration interface in the “Settings” menu a new “Category Meta” page is created. Configure the meta you want to use.
  4. go to your Administration interface, in the “Category” menu -> new fields are displayed in the category creation/modification form with the meta you configured.
  5. That’s it!
  6. 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);
}
  1. 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);
}

Download | Detail

This post was orginally published on: May 21, 2011 and was updated on: October 24, 2017.
FacebookTweetPinLinkedInEmailPrint

Related Stories

  • WordPress Upgrade Precautions

    WordPress Upgrade Precautions

  • How To Upload WordPress Plugins via FTP

    How To Upload WordPress Plugins via FTP

  • Major and Secondary Search Engines and Directories to Submit Website

Avatar of Noor Mustafa Raza

Noor Mustafa Raza

Ex-Editor in chief

I am a WordPress Developer and Designer, author @WPArena. I am providing Free WordPress consultation and can help you to install WordPress in a secure way to small businesses and bloggers.

Reader Interactions

Share Your Thoughts Cancel reply

Before submitting your comment, we kindly ask that you read our comment policy. Your email address will remain confidential and will not be published or shared anywhere. If you subscribe, you will receive notifications regarding new comments.

Primary Sidebar

The Future of WordPress Sites

The Future Of WordPress Sites

people using computers at work

Comparing the Best Employee Engagement Software in the Market

Recent Topics

  • 27 Top SEO Companies in the World
  • 12 Ways To Monetize Your WordPress Blog
  • Comparing the Best Employee Engagement Software in the Market
  • Stellar Converter for OST Review: Best Tool for OST to PST Conversion
  • How To Use WordPress as an eCommerce Store

Footer

Top

  • Services
  • Our Themes
  • Facebook
  • Twitter
  • Linkedin

Reviews

  • Beaver Builder Review
  • Beaver Themer Review
  • WP User Frontend Pro
  • Ninja Forms Review
  • MemberPress Review

More Reviews »

Resources

  • Best WordPress Plugins
  • WordPress Permalinks Structure
  • Email Management System
  • Envato Free Files
  • Advertise
  • Write for us
  • Disclosure
  • Terms
  • Privacy
  • Contact

Copyright © 2023 · All Rights Reserved · WPArena is a Project of TechAbout LLC.
We are not affiliated with Automattic or WordPress.

  • Advertise
  • Write for us
  • Disclosure
  • Terms
  • Privacy
  • Contact
Share this ArticleLike this article? Email it to a friend!

Email sent!