How to hide wordpress visual editor and HTML editor

How to hide wordpress visual editor and HTML editor

If you want to hide the wordpress editor from admin panel then you can use the following code in functions.php file. This is achieved with very simple css trick. You just need to add the following hook into your functions.php file which you can find in your wordpress theme folder.

you can do this in two ways. First with using admin panel.  First thing you need to do is login to your WordPress admin panel.

Then you would need to go to Users > Your Profile,

Just disable visual editor checkbox. That sit. But if you want to this setting to done for all wordpress users then you can use following code.

How to hide wordpress visual editor and HTML editor

How to hide wordpress visual editor and HTML editor
How to hide wordpress visual editor and HTML editor

you just need add following code into your functions.php file. This file you can find in your wordpress theme folder.

 

add_action('admin_head', 'hide_post_box');

function hide_post_box() {
?>
<%%KEEPWHITESPACE%%> <style>
<%%KEEPWHITESPACE%%> #editor-toolbar{ display:none; }
<%%KEEPWHITESPACE%%> #editorcontainer{ display:none; }
<%%KEEPWHITESPACE%%> #quicktags { display:none; }
<%%KEEPWHITESPACE%%> #post-status-info { display:none; }
<%%KEEPWHITESPACE%%> </style>
<?php
}

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

2 thoughts on “How to hide wordpress visual editor and HTML editor”

    1. I have the same question. I’d like to be able to write the function so it only applies to specific admin posts/pages. Please let me know if there is a way to do this.

Leave a Reply

Your email address will not be published.