treehouse : what would you like to learn today?
Web Design Web Development iOS Development

i have problem with wordpress

  • in the name of ALAAh
    finally i create my first Wordpress theme i have problem but not with theme it's with Wordpress i use google syntaxhighlighter plugin and when i add any CSS code in the post all my page change

    Example : if i write body {background:red;}

    all page turn to red .. in all theme even default
  • well unfortunately you have not joined the psychic web designers forum, so you are going to have to give us a link... ;)
  • Yeah, I had a look at this the other day. It's a strange one. :?

    Here's what I noticed (aside from the lurid red background :) )

    If I go to 'view source' your code looks fine, set up exactly the way it is laid out on the google syntaxhighlighter wiki
    <pre name=\"code\" class=\"css\">
    <style type=\"text/css\">
    body { background:red;}
    </style>
    </pre>

    But, on the actual page it is all messed up
    <pre name=\"code\" class=\"css\">
    <style type=\"text/css>
    {;body { background:red
    </style>
    </pre>

    Now the only thing I can think of is that your problems are coming from the fact that your blog is set up for Arabic, in other words it reads from right to left, and the syntax highlighter doesn't know how to handle that.
    Unless anybody else has any ideas :?:
  • apostrophe

    ok i will try the english version of word press

    thanks :)
  • Somewhere in that example code block there is an opening PRE tag that isn't getting closed, see screenshot:

    http://skitch.com/chriscoyier/bcb4a/sou ... p-9-more-9
  • That's new. It wasn't there last week. It looks like you have tried to separate the html syntax from the CSS.
  • "chriscoyier" said:
    Somewhere in that example code block there is an opening PRE tag that isn't getting closed, see screenshot:

    http://skitch.com/chriscoyier/bcb4a/sou ... p-9-more-9


    thanks for try but its same
    http://aftertesting.com/shuobra/?p=9#more-9

    by looking at the bright side .. we can make different page background for each Post :)

    i think it great Error but i want solve it :)
  • and i try it in English wordpress it gave me the same result in any theme :)
  • This one has been really bugging me so I downloaded the plugin and tried it on one of the Wordpress sites I have on my harddrive. The first attempt gave me the same problem as you, with the page background changing color!
    So I went to the Google wiki http://code.google.com/p/syntaxhighlighter/wiki/Usage and after reading it carefully found that every time you want an opening angle bracket (<)in your highlighted code you must use the html entity &lt; so in your blog post type it out like this:
    <pre name=\"code\" class=\"html\">

    &lt;style type=\"text/css\">
    body { background:red;}
    &lt;/style>

    </pre>

    Problem solved! :D
  • apostrophe

    great job it's solved .. 10000 thanx