As you already know, WordPress manipulates posts, even if you write everything in Text mode. (replacing line breaks with \r\n
‘s , converting single quotes into double quotes etc.)
I know this is good for helping us not to mess things up, however, in my case, I want to put HTML codes inside my post -both <code>
and </code>
tags , and some HTML directly-.
so I want to make sure what I see in Text mode (or install an HTML mode somehow) , so that What I See is What I Get, in terms of HTML 🙂
Maybe a better explanation for what I want is this :
What I write in “add new post” window should be exactly equal to what is printed between <div class="entry-content">
and </div>
.
Any tips for this?
Should I change my theme? Or a plugin for tinymce?
p.s.:
I know single quotes should be escaped for database, but I want to preserve line breaks, html tags etc. So please tell me there is a way other than writing directly into the database.
3 Answers
I have decided that the best solution is to just disable the visual editor,
from Users -> Your Profile -> Disable visual editor when writing.