• Resolved Marc Serra

    (@elseudomininet)


    Hi!

    I want to hide title, media buttons and editor (visual and html) from add/edit post, it’s possible?

    I found a great plugin (iMasters Hacks Widgets), whith it I can hide a lot of things, but I can’t hide title an editor.

    Also I tried add the following line into functions.php …

    function customize_meta_boxes() {
      remove_meta_box('editorcontainer','post','normal');
    add_action('admin_init','customize_meta_boxes');

    But I get a blank screen when I access to admin page.

    Any ideas?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Marc Serra

    (@elseudomininet)

    Ok, I find it!

    Edit wp-includes/post.php, on line 26, you can see…

    'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions' ),

    delete “‘editor’,” if you want to hide The Editor box, delete “‘title’,” if you want to hide The Title box, …

    I hope this helps somebody.

    Thank’s to: http://codex.wordpress.org/Function_Reference/register_post_type

    actually this is wrong…

    you shouldn’t edit the wp core files ’cause they’re not going to survive an update…

    I mean, on every update, every core files would be replaced, then your editing will be overwritten…

    I recommend you to use the remove_post_type_support function. Just add the following code everywhere in your functions.php file:

    remove_post_type_support('post', 'editor');

    where the first parameter is the post type and the second parameter is the item you want to remove. You can use this function with the following items:

    title, editor, author, thumbnail, excerpt, trackbacks, custom-fields, comments, revisions

    That way is better for your wp installation, and also in case you want to modify independently your themes…

    See you 🙂

    Thread Starter Marc Serra

    (@elseudomininet)

    thank’s metamorpher,

    but don’t work here!!!

    I added add the bottom of my theme functions.php…

    remove_post_type_support('post', 'title');

    And the title still there.

    ???

    Sorry for that boy… you have to use it like your first function:

    You have to declare a function and add it like an action into admin_init, like this:

    function admin_init()
    	{
    		 remove_post_type_support('post', 'title');
    	}
    	add_action("admin_init", "admin_init");

    🙂

    Thread Starter Marc Serra

    (@elseudomininet)

    oh yes!!! That works great!!!

    Thank’s for your time!!!

    Exactly what I was looking for as well, thanks metamorpher!

    Hi, i try that and it is working but not exactly like i thought. I wish to keep the Upload / Insert button image but hide the Media button and the editor. But if i do

    function admin_init()
    	{
    		 remove_post_type_support('post', 'editor');
    	}
    	add_action("admin_init", "admin_init");

    this hide the editor, buttom image and the Media button.

    How can i keep only the image button??

    Thanks in advance

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Hide editorcontainer in edit/add post’ is closed to new replies.