I never thought this would be difficult. All I want to do is have a box with code in it that people can copy to paste elsewhere. everything I try either strips out the <script> tags and adds < /br> tags, or screws up the code completely so it is worthless. I'm just trying to put the code (for copying) for a linked image and I keep getting this: Is there some kind of trick to getting this to work in Wordrpess? Can anyone help?
Make sure when you are typing your article out, that you are typing it in HTML & not Visual! At the top of the white box where you type all your stuff, on the right top, there should be 2 clickable boxes, one saying Visual, the other Saying HTML. Make sure you have clicked on HTML!
You can use the HTML special characters code for < and > in the HTML editor. This will ensure that the code is not parsed. Here are the codes: http://www.w3schools.com/tags/ref_entities.asp
You mean the one in Quotes? " " Like those? There should be an option for that but I may be a bit confused what your asking for here.
Your code would look like this in the HTML editor: <a><img></a> And like this when you post it: <a><img></a> Naturally, you'd add in the rest of the code, such as the URL...
OK, I had that going before and there was so much extra code there. Isn't there a way just to have a simple linked image code, without all the extra stuff? I just want my users to be able to copy and paste something simple like Isn't there someway to make a box that just simply displays what I type so that it can be copied?
The built-in HTML editor does include an option to use special characters without having to know the code. Just click the button with the symbol that looks like an upside down horseshoe. This video appears to include information about how to use it: http://vimeo.com/11587956
Well...that only covers special characters. I don't need that. I just want a box that I can insert code in (that keeps the code in tact just as a write it) , so users can copy the code and paste it elsewhere. Michelle, yes, I have used the code that you suggested and it comes out just like you said, like this <a><img></a>.So that doesn't do me any good if the code disappears when I save it and my readers only see this <a><img></a>...there is nothing to copy.
Yes Michelle you were right in the beginning. I was doing what you had suggested before and it wasn't working, but then...I remembered that Wordpress MU strips code such as video embeds by default and you have to make adjustments to make it work correctly..that was the problem. Once again it was my own "Duh", and not the code. I got it now, thank for your help, and everyone.
an easier solution to display every scriptlanguage is a plugin named "SyntaxHighlighter Evolved" by Viper007Bond viper007bond.com/wordpress-plugins/syntaxhighlighter/ This plugin is pretty cool for presenting codesnipets and tutorials