- This topic has 3 replies, 2 voices, and was last updated 10 years, 8 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › shortcode problems in wordpress
Tagged: visual editor
I have read WordPress forums where people talk about a problem I am encountering: when you switch back and forth between the visual and text editors, your code becomes corrupted. This is particularly a problem when I’m using Estore and Lightbox, where I’m always adding shortcodes in the visual editor. Ive heard people say: just use the text editor. If i do that, I guess I have to just copy all the shortcodes and keep them in notepad or something? Any thoughts on how to most easily deal with this?
thank you.
The “Text” editor should really be thought of as an HTML editor, because it allows you to use HTML codes to achieve the same effects as the “Visual” editor. Unfortunately, whenever you repeatedly switch back-and-forth between the two editing modes, things go wrong. That is because; people are not machines.
Like the spoken word, HTML is a “living language.” Everybody’s language style is different. Alas, the poor Visual editor, being such a simple chunk of PHP code, is just unable to make accurate interpretations of anyone’s HTML style, except it’s own. And like Microsoft’s notorious Clippy, sometimes the Visual editor is just “too eager to help.”
This is particularly true when it comes to our shortcodes, because they give you so much power; through the use of shortcode parameters. Unfortunately, the spaces within the shortcodes allow the Visual editor an opportunity to be “over helpful,” by inserting unwanted HTML formatting codes; which will later muck up that part of WordPress that parses the shortcodes.
Ideally, you should think of the Visual editor as “training wheels,” on your way to learning HTML. And it’s okay to use a notepad “cheat sheet.” Because at some point, to the horror of your non WordPress literate family members, you will be speaking HTML and our shortcodes; just like a native!
<em>Mum, [table_request object:"butter", nicety:"please"]!</em>
Yea, I just copied all the shortcodes I need and am surviving my initiation into css so I’m taking up residence in the text editor. Thank you for a very entertaining explanation!