How to Hide WordPress Custom Fields on Posts and Pages

If you want to keep the post edit screen as simple as possible for creating new content, here’s a little snippet that will remove the custom fields boxes. This will help to reduce clutter and keep your CMS user-friendly.

Add this to your theme’s functions.php file if you don’t need custom fields:

{code type=php}
add_action(‘admin_init’,’customize_meta_boxes’);

function customize_meta_boxes() {
remove_meta_box(‘postcustom’,’post’,’normal’);
}
{/code}

That snippet applies to posts. If you want to change it to pages, simply swap ‘post’ for ‘page’ and you’re in business.