Results 1 to 3 of 3

Thread: Cancelling CSS in WordPress

  1. #1
    Join Date
    Jul 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Cancelling CSS in WordPress

    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

  2. #2
    Join Date
    Oct 2009
    Posts
    845
    Thanks
    14
    Thanked 189 Times in 188 Posts

    Default

    one way to get around this curly quote problem is to use a plugin like the syntax highlighter
    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.
    Last edited by azoomer; 07-18-2010 at 01:20 AM. Reason: typos, i mean quotes, not brackets

  3. #3
    Join Date
    Jul 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by azoomer View Post
    one way to get around this curly quote problem is to use a plugin like the syntax highlighter
    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...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •