Remove Unwanted Meta Boxes In WordPress

too many dumb Remove Unwanted Meta Boxes In WordPress

When create websites for clients using WordPress, especially for non-blogging purposes where custom post types are used, you might want to remove unnecessary meta boxes in post editing page to keep the page clean and easy to operate. To reach that goal, simply put these lines in functions.php file of your theme:

add_action('admin_menu', 'dbt_remove_boxes');

function dbt_remove_boxes(){
    remove_meta_box('postexcerpt', 'post', 'normal');
    remove_meta_box('postcustom', 'post', 'normal');
    remove_meta_box('trackbacksdiv', 'post', 'normal');
    remove_meta_box('slugdiv', 'post', 'normal');
    remove_meta_box('authordiv', 'post', 'normal');
    remove_meta_box('commentstatusdiv', 'post', 'normal');
}

Change post to custom post type slug if you want to remove meta boxes in editing page for custom post type.

For more information about remove_meta_box() function, please read the Codex.

About Tran Ngoc Tuan Anh

Also known as Rilwis. A web, WordPress developer. Freelance. Founder of Deluxe Blog Tips and Look4WP. Loves books, Internet & technology.

Comments

  1. enrike says:

    exelente
    Muchas gracias

Trackbacks

  1. Remove Unwanted Meta Boxes In WordPress – Deluxe Blog Tips » Wondercore says:

    [...] viaRemove Unwanted Meta Boxes In WordPress – Deluxe Blog Tips. [...]

  2. [...] viaRemove Unwanted Meta Boxes In WordPress – Deluxe Blog Tips. meta boxeswordpress Categorie [...]

Speak Your Mind

*