let's say I have 100 categories and each has 10 custom fields for it self,for example : category Computer : Cpu - Hard - Ram - ... category TV : resolution - inch - usb support - ... ...

now I want the editor only can see related custom fields to post(ex. computer) , I don't want them to see like 1000 custom fields and tries to find the related custom field to fill in, it will take for ever !

I'm making my own theme and can do what ever change that is needed !! I couldn't find any plugin for this !

thanks in advance .

  • categories don't have native custom fields, posts have custom fields, do you mean you have 100 posts each with 10 different custom fields?
    – Bainternet
    May 24, 2011 at 0:06
  • yes !! I don't want custom fields for category; I want it for posts, I just have like 100 post with 10 different custom fields for each post ! and I don't want all 1000 fields to be loaded on "Post New/edit page" , I just want related custom fields to be loaded ! can wordpress do this ?
    – Danny
    May 24, 2011 at 6:41
  • maybe you're looking for something like custom field template?
    – Milo
    May 25, 2011 at 18:26

4 Answers 4


Try using magic fields. It will let you create a custom panel for each category, where you can specify just the custom fields needed for that category. It allows you to present it all in a very user friendly way as well, as well as manuy, many, many other cool things. The plugin will change your life if you do this sort of thing often, using wordpress as CMS!

  • thx,it seems like what i need
    – Danny
    Jun 17, 2011 at 16:00

You can do this with different custom post types (one for computers, one for TVs, ...), but this brings with it some restrictions: it will be difficult to mix different post types with the same URL prefix for example (so you can't have both example.com/products/my-computer/ and example.com/products/my-tv/).

The alternative is to use categories, but then you will have to choose the category before you create the real post.

After this you have to set up the actual custom fields. The code to do this is not very difficult, and there are plugins that can help you set them up, like Custom Metadata Manager. If you figure out how to add one custom field you can figure out how to add one hundred of them too!

This assumes the custom field list is fixed. If it is not you will need to find a way to manage the custom field list so an admin can add them via a GUI. There are plugins that do this too, but I don't have much experience with them and thus can't recommend any.

  • thanks , exactly what I needed , thank you jan :kiss: I wish we could rate the answers
    – Danny
    May 28, 2011 at 13:21
  • @Danny: You can vote on answers once you have 15 reputation points (which you get from votes - on answers or on questions). You can mark one answer as the accepted answer, this is the one that helped you the most.
    – Jan Fabry
    May 28, 2011 at 13:43

You cannot assign custom fields to categories, but you can with Custom Post Types.

Here is a very good tutorial on setting up your custom post types. Or, this tutorial shows you how to use a plugin if you don't want to do any coding.

  • thank you @Milo , that was exactly what i was looking for !!! I just wish it was easier to create custom fields,its kinda hard for a normal user to use it !
    – Danny
    May 25, 2011 at 20:57
  • you might as well mark this as answered or delete the question. thanks
    – edzillion
    May 26, 2011 at 12:39
  • I still haven't gotten a better answer , I want to know if there is a plugin that is easier to use , otherwise I'm gonna have to edit a plugin myself ! I'll mark it as answered in two days if I there was no other solution,thx
    – Danny
    May 26, 2011 at 16:32

Try using Extra Category Content:

Extra category content is a simple plugin that adds a rich text editor to every category in your wordpress site, that gives you the opportunity to create a special description for the category, different from the default category description.

You can also add any HTML code to the description, so you can include an image, a table or a specially formatted text.

This plugin is useful if you want for example to add a general description or an image before the listing of the post from a category.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.