1

I want to add permanently boxes below Visual/HTML editor for each page/post. I've never played with custom fields before, and I'm not sure is it way to go?

If yes ten tell me, good people of StackExchange, how to achieve something like that (grey boxes):

enter image description here

1 Answer 1

1

Your looking for custom meta fields, which you can style anyway you want using CSS. http://codex.wordpress.org/Custom_Fields

You would either have to write your own functions to accomplish this or use one of the many custom fields plugins, I would recommend the WPAlchemy MetaBox.

4
  • so I should definitely use add_post_meta()? Codex says it always needs a post ID so I'm not sure how to attach my boxes to more than one? And what if I want different set of metaboxes for pages, posts and custom post types? Thank you! Mar 27, 2011 at 23:16
  • 1
    I guess you made a mistake and I'm looking for add_meta_box() instead of meta fields, right? :) Mar 27, 2011 at 23:26
  • 1
    Yes they are very similar and the terminology does get mixed up, a meta box is basically a meta field, but you are right, using meta box makes it easier to add separate boxes/write panels. The functions to use them are the same.
    – Wyck
    Mar 28, 2011 at 0:09
  • NOTE: Callback functions for metaboxes receive the $post object as the first incoming parameter(so you can extract the post ID from there if you need it).
    – t31os
    Mar 28, 2011 at 10:51

Your Answer

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

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