Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Add question

You must login to ask question.

Login

Register Now

Register now and start to ask your questions or share your knowledge with your community and friends with answering their questions. Earn points for trustability.

How To Remove Tabs From WordPress Default Text Editor

Copy the below code and paste it inside the functions.php file from your current activated theme’s folder.

//remove the visual & text tab options
add_filter( ‘user_can_richedit’ , ‘__return_false’, 50 );

How to Remove Visual & Text Tabs from Default Editor from WordPress Admin
We have used to hide the editor tabs easily with the help of CSS. We’ll output some CSS to the admin’s head to do that. Below code will hide the visual tab option from the new post page. If you want to hide it for the page as well, then add your conditions in below if statement.

function hide_editor_tabs() {
global $pagenow;
// Only output the CSS if we’re on the edit post or add new post screens.
if ( ! ( ‘post.php’ == $pagenow || ‘post-new.php’ == $pagenow ) ) {
    return}
?>
<style>
.wpeditortabs {display: none;}
</style>
<?php
}
add_action( ‘admin_head’, ‘hide_editor_tabs’ );
 – – –
Credit: https://www.freewebmentor.com/2017/10/remove-visual-text-tab-wordpress-default-editor.html

About Floridify TeamProfessional Badge


Follow Me

Leave a reply