WordPress, stop changing my HTML code!
Problem
The visual editor packed with WordPress is beautiful and very user friendly. But if you are like me, sometimes a visual editor is not going to cut it. When writing a post or a page, you have two options: Visual or Code. Selecting the Code tab can be somewhat sneaky. For example, you create your post in Dreamweaver then copy and paste it into the code view. Once you have published that post and go back to edit it you will find that WordPress has completely changed and rearranged your HTML and CSS. This can be very aggravating but there is a solution.
Solution
From the WordPress admin section click on Users. Edit your account and click on Your Profile. Uncheck the box ‘Use the visual editor when writing’ and then click Update Profile. Now you can write your posts and pages with HTML and CSS and not worry about WordPress changing your code. Hooray for code preservation!
Filed under: WordPress








fluxcapacity » Blog Archive » One solution to Wordpress code-snippet formatting problems:
[...] goes on. The first thing we noticed from reading posts from frustrated bloggers is that if you avoid the Visual editor altogether, it won’t mangle your post’s formatting. Some people create special accounts with the [...]
Posted on July 22nd, 2007 at 9:11 pm
Hillary:
I tried your suggestion and it is still chomping up my HTML and spitting it out. this is so frustrating.
Posted on October 19th, 2007 at 12:21 pm
Josh Stauffer:
Can you explain what you are doing exactly?
Posted on October 19th, 2007 at 5:37 pm
Hillary:
I create the post in dreaweaver and then copy and paste and wordpress changes nearly all of my code. For example, I encoded my email address to hide it from spambots and wordpress keep uncoding it. In turn, it removes amazon referral links.
Posted on October 19th, 2007 at 9:20 pm
Josh Stauffer:
Can you double check that you have performed the steps necessary in my post? For the email address try to use the ascii code @ instead of the @ character. Also, you might try Googling the WordPress plugin WP-Amazon and see if it helps with your problem.
Posted on October 20th, 2007 at 12:49 pm