More WordPress stuff

Reasons not to trust the Visual Editor.

Below is a script that creates a button:

All I did was paste the code into the Text Editor.

But when I switch to the Visual Editor:

<script>// <![CDATA[
function goBack() { window.history.back() }
// ]]></script>
<button onclick=”goBack()”>Go Back</button>

Aha, now you see the code I pasted in to create the button. The Visual Editor has kindly encoded the angle brackets so that the code no longer works.

Also, I just cleaned up some posts and pages from a Visual Editor fan. There were a bunch of empty heading tags in amongst the content. Another big no-no. WordPress uses the H1 tag for your site name and the H2 tag for your Post or Page title. It isn’t just about fonts!

About Kathy

Perl, MySQL, CGI scripting, web design, graphics following careers as an analytical chemist and educator, then in IT as a database administrator (DBA), programmer, and server administrator. Diagnosed with Mitochondrial Myopathy in 1997.
This entry was posted in Technical. Bookmark the permalink.