Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have multiple meta boxes for my Custom Post Type posts.

I want my users to add new fields using Custom Fields. The problem is - Custom Fields display all the garbage from my metaboxes and it might be very confusing for users.

Here's a screenshot, the two first fields were added by an user and the rest comes from the theme itself (there are metaboxes above this "Custom Fields" box which use / reset these fields on post save). How do I hide them?

share|improve this question
    
I, personally dislike WordPress' default Custom Field design. Why not incorporate a good plugin like "Advanced Custom Fields" (ACF) or "Extra Fields"? With my ACF experience I can say, you can choose what CFs will be visible and in that post type what other meta boxes will be visible too. –  Mayeenul Islam Dec 3 '13 at 1:07
    
I know, but I don't want to use any plugins, this default Custom Field design is good enough and have all the features I need, the only problem is I have absolutely no idea how to work this issue out... Also I just want to know the answer (and I hope there is one, if not then Custom Fields seem useless to me), and I wouldn't learn anything new using plugin :) Thanks a lot anyway! –  Wordpressor Dec 3 '13 at 1:48

1 Answer 1

up vote 1 down vote accepted

Prefix all meta data keys used in meta boxes with an underscore, this will hide them automatically from the built in Custom Fields interface.

So instead of:

themeprefix_source

Use:

_themeprefix_source
share|improve this answer
    
Neat! Is this somewhere in documentation? –  Wordpressor Dec 8 '13 at 16:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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