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've added a custom textarea for the create/edit post admin page. I did so using the add_meta_box() function. The problem is that the add_meta_box() callback function (which saves the data input into the textarea) calls the update_post_meta(). update_post_meta() then adds a custom field within the custom field section. So you essential end up with two textareas for the same field! The one you've created and the auto generated one!

Is there a way to remove the auto generated custom field?

Thanks, Jon

share|improve this question

1 Answer 1

If the meta field starts with an underscore, it will be hidden in the interface by adding the class hidden to the <tr> element. You could also apply this class by yourself using Javascript, the <tr> element has an id of meta-{$custom_field_id}.

share|improve this answer
1  
Hi Jan. Thanks for the reply. Prefixing the name with and underscore hides the auto generated custom field AND the manually added meta box! So that's no good really. –  Jon Sep 3 '10 at 11:55

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.