• Resolved delas

    (@delas)


    Hello everyone,

    Hello to all the coders, I’m getting this error in category-property.php file (Parse error: syntax error, unexpected ‘}’ in /home/maison/domains/abidjanresidence.net/public_html/wp-content/themes/home/category-property.php on line 28 and i cant figure out that the problem is. I’ve taken things out put things in, still no go. So i would greatly appreciate your help in this matter.

    here is the code: http://pastebin.com/NS4jPy27

Viewing 8 replies - 1 through 8 (of 8 total)
  • your code is partially broken because it was posted without being marked as code;

    please paste the code into a pastebin – http://codex.ww.wp.xz.cn/Forum_Welcome#Posting_Code – this has the added advantage of showing line numbers.

    Thread Starter delas

    (@delas)

    I spent hours checking the forum but I could not find anything that could help me. I am new to PHP.

    Delas, can you copy it out of the file exactly and mark the syntax highlighting as php please?

    Also, can you just upload a fresh copy of category-property.php?

    This is a really good example of why you should always make a child theme.

    Thread Starter delas

    (@delas)

    Andrew, I have not succeed in highlighting it like you asked but this is Line 28. I hope this can help.

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    ?><?php} else  { echo'<a href="'.get_permalink().'">'.multisearch($post->ID,'medium').'</a>'; }?>
    Thread Starter delas

    (@delas)

    Hello again Andrew,

    I think I succeeded in highlighting it.

    [code removed - please see the above posts]

    @delas – please see the above posts re: posting code here – again, you cannot post code here that way – it gets corrupted and it messes up the forums. Please use a pastebin.

    try and add a space after <?php:

    ?><?php } else { echo'<a href="'.get_permalink().'">'.multisearch($post->ID,'medium').'</a>'; }?>

    possibly review:
    http://make.ww.wp.xz.cn/core/handbook/coding-standards/php/

    Thread Starter delas

    (@delas)

    Hello Alchymyth,

    I don’t know how to think you.
    This is great. you have saved my life. Thank you soooo much

    Cheers
    Delas

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Parse error: syntax error, unexpected '}' in’ is closed to new replies.