How to Hide WordPress Custom Fields on Posts and Pages

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:

add_action('admin_init','customize_meta_boxes');

function customize_meta_boxes() {
remove_meta_box('postcustom','post','normal');
}

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

Free Video Why 100 is NOT a Perfect Google PageSpeed Score (*5 Min Watch) Learn how to use Google PageSpeed Insights to set realistic goals, improve site speed, and why aiming for a perfect 100 is the WRONG goal.
Tags: