Support » Plugins » remove_meta_box not working for some boxes

  • Resolved conualfy


    I’m using Magic Fields for a site and I do not need any of the original text fields in WP (not even the post textarea) and for normal users I want to disable the All in one SEO box also, but remove-meta-boxes seems not to work for them.

    These are not working for those boxes.

    Do you know how I can remove them?


Viewing 3 replies - 1 through 3 (of 3 total)
  • The SEO plugin meta boxes are added to the admin at one function at the ‘admin_menu’ action:

    add_action('admin_menu', 'aioseop_meta_box_add');

    You can remove all the boxes added at that action with

    remove_action('admin_menu', 'aioseop_meta_box_add');

    @david Thanks a lot, it works!

    Do you know how to remove the post textarea, the (it shows in post.php, post-new.php)?

    As I use Magic Fields, I record all the information in custom fields and I do not need these fields/boxes:
    Media Buttons (all) (#media-buttons)
    Word count (#wp-word-count)
    Post Slug (#slugdiv,#edit-slug-box)
    HTML Editor Button (#editor-toolbar #edButtonHTML, #quicktags)
    Post Thumbnail (#postimagediv)

    add_action( 'admin_head', 'ds_hide_stuff'  );
    function ds_hide_stuff() {
    	global $post_type;
    		remove_action( 'media_buttons', 'media_buttons' );
    		remove_meta_box('slugdiv', $post_type, 'normal');
    		remove_meta_box('postimagediv', $post_type, 'side');
    		$ds_hide_postdiv = "<style type=\"text/css\"> #postdiv, #postdivrich { display: none; }</style>";
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘remove_meta_box not working for some boxes’ is closed to new replies.