The WordPress content editor will always show you the ‘Visual’ tab by default. If you are one of the many people who have problems with the visual editor stripping out your HTML tags or attributes, this can quickly get very annoying – every time you load a post to make changes, it lands on the Visual tab and has all your nice HTML removed.

Here’s a simple line of code that you can add to your theme’s functions.php file to ensure that it always lands on the HTML tab by default (you will still have the option of switching to the Visual tab of course):

This example will ensure that only non-admin users see the HTML editor by default.

2 Comments

  1. Thank you so much that really helped! Is there a way to make it so that change only applies to regular users while the admin retains the visual as the default?

    Like

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s