How can I remove specific custom post meta from the “Custom Fields” fieldset?

I’ve created a custom meta box to handle certain custom post meta fields and I don’t want the clutter of having these custom fields duplicated down in the “Custom Fields” area.

How can I remove specific custom post meta from the “Custom Fields” fieldset?

Related posts

Leave a Reply

2 comments

  1. You can hook into the is_protected_meta filter and return true for any custom field you want to hide.

    add_filter('is_protected_meta', 'my_is_protected_meta_filter', 10, 2);
    function my_is_protected_meta_filter($protected, $meta_key) {
        return $meta_key == 'meta-name' ? true : $protected;
    }