I don't understand how to use customs-field on register_post_type. On Codex, for "build" an register post, there is a parameter "support" that is an array with 'customs-field" . Can you explain with example if is possible ?


Thanks a lot

1 Answer 1


first you need to understand the support parameter, so from the codex:

Register support of certain features for a given post type(s). All features are directly associated with a functional area of the edit screen, such as the editor or a meta box. Additionally, the 'revisions' feature dictates whether the post type will store revisions, and the 'comments' feature dictates whether the comments count will show on the edit screen.

So basically what this means is that if you register your post type with custom-fields in the support parameter of register_post_type eg:

'supports' => array('custom-fields','title','editor','author','thumbnail','excerpt','comments')

your post type will support custom fields and the custom fields metabox will show on your custom post type edit screen, this one: custom fields metabox

and how to use them is another question which has a great entry in the codex

  • Thank for your answer. So, customs_field equal meta_box ? If i don't add custom-fields on support's array , i can't add meta_box ? Nov 9, 2011 at 9:46
  • NO, custom fields equal customs fields meta_box.
    – Bainternet
    Nov 9, 2011 at 9:55
  • OH, yes . I have tested and saw ... but have you an example to use it ? Nov 9, 2011 at 9:59
  • how to use custom fields? codex.wordpress.org/Using_Custom_Fields
    – Bainternet
    Nov 9, 2011 at 10:04

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.