I would like to add custom contents to post, such as price, options and some others, I dont like to use the custom fields, because always i have to select from a drop down menu, I want these options to be in a separate area such as title, editor, thumbnail... I think its possible, I have seen this in WP Ecommerce plugin.

Can anyone tell how t do it?


2 Answers 2


You're looking for custom meta boxes. These allow you to add sections to the WordPress post and/or page screens that look like standard title, editor, category selection, etc. Generally speaking, you determine where they are rendered and what type of input elements are used.

Without knowing exactly what you're trying to do, it's not possible to provide a tutorial but there are a number of resources that will get you started:

  • The WordPress Codex has a decent article that explains the API function.

  • I've written a two-part article (Part 1, Part 2) that walks you through adding a custom meta box and referencing it in your post and/or pages.

  • Here's another solid tutorial (Part 1, Part 2, Part 3) that does an excellent job of providing an introduction and working example of how to create your own custom meta boxes.

Reviewing this articles should provide you with a solid foundation to get started on writing your own functionality.

  • thanks a lot, i am trying to create a small ecommerce site, but do not want to use ecommerce plugins, thanks for the resource.
    – srisar
    Feb 23, 2012 at 3:56

What you're asking for requires the use of custom fields. However, it's not necessary to use the default meta box that WordPress provides (the drop-down list you describe).

There are many different plugins that offer an easier way to manage custom fields, if you don't wish to write your own functions. For example, you could use one named Advanced Custom Fields to create your own fields of various different types - not limited to single-line text fields. Then for inserting them into the WordPress visual editor you could use something such as Custom Fields Shortcodes.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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