» » WordPress: Set the Default Editor the Way You Want

WordPress: Set the Default Editor the Way You Want

posted in: WordPress | 0

Whether you like “Visual Mode” or “Text Mode” as your Post Editor’s default, choose one of the code hacks below to lock it in.

Add the following script to your functions.php for “Visual Mode” as default:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Visual Editor as default
add_filter( 'wp_default_editor', create_function('', 'return "tinymce";') );

function remove_canvas_main_navigation () {
// Remove main nav from the woo_header_after hook
remove_action( 'woo_header_after','woo_nav', 10 );
}
// And to remove the Top Navigation, you will need this:
add_action( 'init', 'remove_canvas_top_navigation', 10 );

function remove_canvas_top_navigation () {
// Remove top nav from the woo_top hook
remove_action( 'woo_top', 'woo_top_navigation', 10 );
}

Add the following script to your functions.php for “Text Mode” as default:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# HTML Editor as default
add_filter( 'wp_default_editor', create_function('', 'return "html";') );
add_action( 'init', 'remove_canvas_main_navigation', 10 );

function remove_canvas_main_navigation () {
// Remove main nav from the woo_header_after hook
remove_action( 'woo_header_after','woo_nav', 10 );
}
// And to remove the Top Navigation, you will need this:
add_action( 'init', 'remove_canvas_top_navigation', 10 );

function remove_canvas_top_navigation () {
// Remove top nav from the woo_top hook
remove_action( 'woo_top', 'woo_top_navigation', 10 );
}

WordPress Rocks! If you can dream it, I can create it!
Like this article? Please click below to share it. Thanks!

Leave a Reply