Wordpress Stripping Code From My Website!

Last Update: March 03, 2019

I've become re-interested in the possibility of building my two Wordpress sites into HTML-only sites, perhaps using the new version of Dreamweaver CC. I’ve noticed that it incorporates the current HTML5 tags, Doc type, a live split screen showing what your changes do to the page, as well as other neat features to make building responsive websites easier.

I’m thinking of this because I find myself at a crossroad again. Years ago I had purchased Adobe Web Premium CS3. I had built and maintained three or four small websites with intent for monetization. It was fairly easy to update files with Dreamweaver using FileZilla to FTP my updated files to the server. Eventually, CS3 became outdated, and I wasn't willing to move to cloud-based subscription, so I rebuilt three sites onto Wordpress.

I have two other small sites that I've left as HTML, because they're small local business sites with only eight or ten static pages each. The Doc types and some other improvements need updating, but they're still working just fine. There's no frustration with constantly having to update Wordpress and plugins all the time and they just don’t ever break.

Of the sites I've moved over to Wordpress, I’ve tried two or three different well-designed premium themes. I have enjoyed being able to switch back and forth between Visual and HTML modes. I tried the built-in page builder of one themes recently, but found it to be excruciatingly slow to build within their blocks, with many steps involved. I was spending so much time with these blocks, but it was only locking me into difficult-to-edit pages and posts.

Now recently, Wordpress has introduced their Gutenburg page builder. I’ve tried it and I’ve found the same great frustrations. So now I’ve installed the Classic Editor plugin and am fine with that. I need to work with the code sometimes and I enjoy having the design freedom to do many things.

I would switch back and forth between the Visual and Text (HTML) editors so as to help find my way around the page as I’m editing.

Now, however, I've rediscovered Wordpress's fatal flaw, that it's stripping my pages and posts of HTML tags and analytics tracking codes as I work on them. I’ve discovered that this occurs when I switch back and forth between HTML Text mode and the Visual editor mode.

Hours of formatting work have disappeared repeatedly before I discovered what was happening. Now, I'm scouring the net and trying to find a solution to resolve this, but none have worked so far. I've tried adding several different code fixes to the functions.php file and have tried at least two different plugins, which were meant to resolve this, all to no avail.

The only thing that has worked to prevent Wordpress from perpetually wrecking my code and formatting, is to disable the Visual mode. But, by doing this, I now only see reams of text and code, which makes it difficult to navigate and find my place on the page.

I can view the current webpage design in a separate browser tab, but I no longer have the benefit of advanced page building tools, only basic tags.

Do a quick Google search and you'll find that this problem is frustrating many well-experienced webmasters. It’s more pervasive than we think.

It’s not related to specific Wordpress themes, it has to do with the TinyMCE HTML WYSIWYG editor Wordpress uses in its programming.

It keeps getting worse. Wordpress will shift tags around to encapsulate stuff I’ve never tagged. Not only is Wordpress stripping out simple HTML tags like <p>, <strong> and others, but they’re also stripping out needed scripts like onclick and others, which is used for Analytics tracking.

Wordpress has no right to do that! It’s my site, and I expect my interface to allow me to code and format it the way I want to! WordPress seems to think that we shouldn’t have the freedom to do our own coding and they’re changing things that disallow it. Thanks, WordPress.

So now, I'm looking to see if I'd be better off rebuilding my two Wordpress websites as HTML sites, perhaps using Dreamweaver CC, and ditching Wordpress altogether. I don't know, I've read about some frustrating things about Dreamweaver too. I could code the sites without Dreamweaver using something like Notepad++, but I'd stll have to learn php and MySQL to add blog capabilty if I wanted it. I'd just soon figure out a solution to this Wordpress problem and stick with it.

Does anyone have any thoughts on this? Have you experienced this problem yourselves? If so, have you found a solution to it?

-Mark

*

Join the Discussion
Write something…
Recent messages
JohnnyMark1 Premium Plus
Hey, thanks Jay! *grin*
Reply
Hudson Premium
Hi, this is way beyond me but interesting none the less. I can only sympathise at your frustration, and suggest you take it up with Site Support. They may well have an answer.
Reply
Eliz65 Premium
I’m in awe of your knowledge. Unfortunately this not something I know anything about. Have you talked to site support?
Good luck, hopefully someone in the community may have answers for you.
Reply
MAXINEG Premium Plus
Great suggestion to contact SiteSupport Eliz65.
Reply
JohnnyMark1 Premium Plus
Hi Eliz65, Thanks for the suggestion. I may contact site support for suggestions, but I'm pretty sure the issue is related to Wordpress and not hosting. I was curious to know what others in the community have done to avert or manage this problem. Surely, others have dealt with it.
Reply
MAXINEG Premium Plus
You really have to know code to appreciate what Johnny is talking about.

As for me I have zero experience.

So, SiteSupport is my best suggestion.

If that Tiny MCE HTML WYSIWYG is disrupting your formatting, this should not be allowed to happen.

Professional coders have experience and their expertise sholud be allowed in their work.

Take care.
Reply
JohnnyMark1 Premium Plus
Agreed Maxine! Wordpress shouldn't be messing with the way people want to format their sites. Lately, I've come to the conclusion that instead of re-building my sites, I'm just going to keep my editor in 'Text' (HTML) format, and be careful to NOT click into the 'Visual' mode. It just makes it more difficult to navigate around the page if there's a lot of content.. On new pages where such critical formatting hasn't yet been added, it won't matter what mode you're in until you're ready to add additional formatting and tracking code.

However, if you save a new page while being in Visual mode, and then open another page, it'll open up in Visual mode, and likely strip tracking and formatting code, and wreck a lot of work. Everyone must be aware of this.

So, as a hedge to this possibility, I'm now also in the habit of copying all the text code from every page and saving it in a .txt file on my computer.

Thanks for your comments Maxine.
Reply
MAXINEG Premium Plus
You're most welcome Johnny.

I am sticking to text mode just to be one the safe side.
All the best
Maxine
Reply
phil1944 Premium
That's very frustrating, Mark. It's all to do with the "Big brother knows best" attitude exhibited by many large companies in the IM space. And their attitude towards anyone who differs is either to ignore them or to respond to their issues with nonsense clearly written by someone who has neither the experience nor understanding to grasp the problem. "Have you tried restarting your computer or upgrading to the latest version of WordPress?"

I used Dreamweaver many years ago and found it excellent. But that was then.

I use WP now but don't push it the way you have.

Sorry I can't help. Just wanted to sympathize.
Reply
JohnnyMark1 Premium Plus
Hi Phil, Thanks for the comments. I know that there are real benefits to using Wordpress, so I'm not looking forward to all the work that would be involved with rebuilding two whole websites. I'd rather find a solution and keep working in Wordpress. Maybe the solution is to always copy the full page HTML text (Text View), as a .txt document to my computer as back ups. Then while working on the pages that have critical formatting and tracking codes inserted, always be conscientious to NOT click over to Visual mode.

On other pages, where the formatting isn't as susceptible to code stripping, it might not matter if we toggle back and forth between the Visual and Text modes.

I've learned about other code building software that is helpful in building HTML sites, that competes with Dreamweaver. Coda2 is one very popular one among web developers. I'm only thinkking about Dreamweaver, because I've already paid for Adobes subscription to their Creative Cloud services, which includes DW, Photshop, Illustrator, etc.

-Mark
Reply
Top