Support » Fixing WordPress » My first wordpress site [NSFW]

Viewing 15 replies - 1 through 15 (of 16 total)
  • Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    You’ll have to be more specific on the problem, other than “about code… Make it good”.

    i check my theme css using w3 validator and i got it contain many error found, and confuse about php code too…
    like this which i cannot solve it, i want to hyperlink , AdultBabes.net
    here is link format i use. , AdultBabes.net
    but when do that i always get error parser.

    $year = date(‘Y’);
    if ($year != 2012){
    echo ‘© 2012 – ‘.$year.’, AdultBabes.net’;
    } else {
    echo ‘© 2012, AdultBabes.net’;
    }

    please help me and thanks in advance….

    oh my bad, here is my link format code.

    <a href='http://www.adultbabes.net' title='Free Quality Porn Downloads'>, AdultBabes.net</a>

    Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    Do you get the parse error with PHP, not W3C validator?

    yes error with php. can you help me to fix it ?

    the one i got error in w3c validation are my theme style.css

    any suggestion how i can learn css the easy way. thank andrew 🙂

    Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    What is the entire error message and what line of code is it referring to?

    $year = date('Y');
    if ($year != 2012){
    echo '© 2012 – '.$year.' <a href='http://www.adultbabes.net' title='Free Quality Porn Downloads'>, AdultBabes.net</a>';
    } else {
    echo '© 2012 <a href='http://www.adultbabes.net' title='Free Quality Porn Downloads'>, AdultBabes.net</a>';

    Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ on line 7

    Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    Which line is line 7?

    i use online php run test code.. everything fine, but when i replace , AdultBabes.net with these code i got error.

    <a href='http://www.adultbabes.net' title='Free Quality Porn Downloads'>, AdultBabes.net</a>

    thank you.

    Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    Could you post just the code on line 7, that the error is referring?

    i tried to use other online php code tester, and here the other result

    $year = date('Y');
    if ($year != 2012){
    echo '© 2012 – '.$year.' <a href='http://www.adultbabes.net' title='Free Quality Porn Downloads'>, AdultBabes.net</a>';
    } else {
    echo '© 2012 <a href='http://www.adultbabes.net' title='Free Quality Porn Downloads'>, AdultBabes.net</a>';
    }

    Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ in /homepages/26/d94605010/htdocs/lz/writecodeonline.com/php4/index.php(138) : eval()’d code on line 3

    i got that error message when i test using php4. and its mean i use php4 code or what? and are there an easy way to convert it to php5 code.?

    thanks

    Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    Replace that code excerpt with this;

    $year = date('Y');
    if ($year != 2012){
    echo "© 2012 – "'.$year.'" <a href='http://www.adultbabes.net' title='Free Quality Porn Downloads'>, AdultBabes.net</a>";
    } else {
    echo "© 2012 <a href='http://www.adultbabes.net' title='Free Quality Porn Downloads'>, AdultBabes.net</a>";
    }

    i got this error message

    Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ‘,’ or ‘;’ in /homepages/26/d94605010/htdocs/lz/writecodeonline.com/php4/index.php(138) : eval()’d code on line 3

    Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    Sorry, try this instead;

    $year = date('Y');
    if ($year != 2012){
    echo "© 2012 – ".$year." <a href='http://www.adultbabes.net' title='Free Quality Porn Downloads'>, AdultBabes.net</a>";
    } else {
    echo "© 2012 <a href='http://www.adultbabes.net' title='Free Quality Porn Downloads'>, AdultBabes.net</a>";
    }

    hooray……… wow…. so many thank a lot mate…..
    its work…. hehehe….. sorry for wasting your time mate… 🙂

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘My first wordpress site [NSFW]’ is closed to new replies.