• Resolved deannamarie

    (@deannamarie)


    Please tell me why I get this error: Parse error: syntax error, unexpected T_ENDWHILE in SERVERPATHEDITEDOUTwp-content/themes/rainyday/index.php on line 37

    The index file is viewable as a .phps file here, as well as thesidebar, comments, and footer. Those are all the pages included on the index.

    Let me note, I have looked through the Codex, compared my loop to the simplest working one in the Codex to double check that everything is in its place, ensured all plugins work by placing the same tags in the default Kubrick template, made sure all plugins were active…

    Basically, I’ve done everything I can think of and I still get an error.

    Any help will be greatly appreciated.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter deannamarie

    (@deannamarie)

    Either no one knows or no one cares.

    Or nobody is willing to count the lines… ??
    If you paste it here https://wordpress.pastebin.ca – ate least we can save the line counting.

    BTW, the error is always due to some bad code.

    Thread Starter deannamarie

    (@deannamarie)

    I was looking for one of those types of sites! I couldn’t remember the url. Thanks, moshu :).

    Yeah, I know it’s always some kind of silly mistake in my code, but it just doesn’t make sense to me. When I counted the lines, it showed up as my endwhile being the error.

    Anyway, with lines all counted out neatly, here’s the index, sidebar, comments, and footer.

    I am not a coder, but sometimes I succeed to read a code. Is the “if is_single” statement closed anywhere? I can’t see it…

    Thread Starter deannamarie

    (@deannamarie)

    Hmm…it’s not anywhere close to line 37, but I’ll remove it for a second and see if that’s it.

    …nope. And I’m not a php whiz, but it looks like it’s closed immediately after the “at” in that line.

    The following if statement does not close, and is the cause of your error:

    <?php if (is_single() && function_exists(UTW_ShowTagsForCurrentPost)) { ?>

    I didn’t say it’s close to 37.
    I said it is NOT closed (line 33)
    <?php if (is_single() && function_exists(UTW_ShowTagsForCurrentPost)) { ?>

    { = open
    missing the closing }

    and then “unexpected” something in 37… says the error mesage.
    I’d start looking at this one.

    OMG, after 2 and half years spent around here – the first time that I got a PHP code right, almost exactly as Kaf posted. Great school…

    Hey, I know I’ve been rubbing… ;)

    Thread Starter deannamarie

    (@deannamarie)

    Ah, thanks for catching my stupid error. I didn’t even need that line.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Error in Custom Theme’ is closed to new replies.