View Full Version : Cancelling CSS in WordPress
Dwight
07-17-2010, 06:34 PM
I need to post a paragraph or two with totally plain text so when someone copies and pastes it won't pick up formatting, similar to this:
<!–- Begin example.com link -–>
<a href=”http://www.example.com” target=”_blank”><img border=”0? src=”http://www.example.com/images/link.gif” width=”201? height=”82?></a>
<!–- End example.com link -–>
I entered it correctly, and it looks right on the page, but as you can see, when it is copy and pasted, the double quotes became curly and question marks.
How can I cancel the CSS effects for just one paragraph or table cell? I don't want to mess with the whole style sheet. Is there an inline code that says ignore all CSS??
Thanks
azoomer
07-17-2010, 07:44 PM
one way to get around this curly quote problem is to use a plugin like the syntax highlighter (http://wordpress.org/extend/plugins/syntaxhighlighter/)
You can probably find other plugins that have a more neutral look, but it is also possible to style this plugin in the backend of wordpress and if that's not enough, it has it's own stylesheet you can fiddle with. I guess you are probably looking for a simpler solution, so maybe someone else knows of an easier way to do it
Edit: Googled it and found out that you can paste this in your functions.php
remove_filter('the_content', 'wptexturize');
and it will get rid of the curly quotes altogether. I just tried it and it works. A shame though if you like the curly quotes in general, but just want to remove it from code.
Dwight
07-17-2010, 11:20 PM
one way to get around this curly quote problem is to use a plugin like the syntax highlighter (http://wordpress.org/extend/plugins/syntaxhighlighter/)
You can probably find other plugins that have a more neutral look, but it is also possible to style this plugin in the backend of wordpress and if that's not enough, it has it's own stylesheet you can fiddle with. I guess you are probably looking for a simpler solution, so maybe someone else knows of an easier way to do it
Edit: Googled it and found out that you pan paste this in your functions.php
remove_filter('the_content', 'wptexturize');
and it will get rid of the curly brackets altogether. I just tried it and it works. A shame though if you like the curly brackets in general, but just want to remove it from code.
Thanks, I'll do that if I have to, but I'd really just like to remove it from the code snippets. What would happen if I used single quotes instead? I'm not much of a programmer or anything, but seems I've seen it that way too.. maybe I'm looking for an ax to kill a mouse...
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.