WordPress Custom Fields by category

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 !

Read More

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 .

Related posts

Leave a Reply

4 comments

  1. 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!

  2. 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.

  3. 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.