WordPress editor removes class= when posting code.
-
I’m working on a blog about my journey learning to write WordPress templates. Because of this, I post a lot of my code.
I’ve noticed if I post something likediv class=’container’
the class will get stripped out. I’ve been able to work around this using Paste as Plain Text, but I lose my formatting. Is this the only way to get this working or am I missing an option in the editor?
I’ve tried searching the forums, but most of the suggestions say to just use the HTML tab, so I think my search is bad and it’s returning ways to use code in the editor.
Any help would be appreciated. Thanks.
The topic ‘WordPress editor removes class= when posting code.’ is closed to new replies.