• Hi guys,

    I have a major error that makes my website not to display. Here is the error and the code in question.

    Thank you in advance

    Parse error: syntax error, unexpected T_ELSE in *************************************************/index.php on line 12

    [Code moderated as per the Forum Rules. Please use the pastebin]

Viewing 2 replies - 1 through 2 (of 2 total)
  • I would suggest re posting your code using http://pastebin.com/
    be sure to include the entire code if you did not

    wpismypuppet

    (@wordpressismypuppet)

    It’s because you are closing your first if statement here:

    <?php if(strlen(get_the_excerpt()) > 120) : ?>...<?php endif; ?>

    and are not starting another if after that. So when it comes to your

    <?php else: ?>

    it’s throwing an error… There’s also more errors on that page then the simple if. You have an endwhile with no starting while… you have another endif with no opening if statement. You have a little work to do!

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

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