• rstritmatter

    (@rstritmatter)


    HI folks, I was messing around above my pay wp paygrade, trying to change some code to the index page so that the site would not display posts from some categories on the index page, and produced the following error message:

    Parse error: parse error, unexpected T_ENDWHILE in /home/content/w/e/s/westsideorg/html/wp-content/themes/cutline-3-column-split-11/index.php on line 22

    While this was disappointing, I though it would be easily fixed by ftping a saved version of the index page back into the themes folder/cutline folder. No luck. Same error message.

    Then I tried to reinstall the entire cutline folder by ftp. Still the same error. I don’t get it. Shouldn’t whatever syntax error I introduced through my edit be fixed by ftping a fresh install?

    Any help much appreciated.

    I think I have 2.3.3 but it could be 2.3.1. Installed originally about a month ago.

Viewing 11 replies - 1 through 11 (of 11 total)
  • SimonJ

    (@simonj)

    This message most likely means that you forgot to close something before the endwhile, or you have a double <?php endwhile; ?> tag…

    Could you paste your complete index.php there :

    https://wordpress.pastebin.ca/

    And give us the link, then we will be able to help you.

    S.

    Thread Starter rstritmatter

    (@rstritmatter)

    Just to follow up on the above post. I’ve realized the problem is one of file management. I see that the problem is in cutline-3-column-split-11 (the themes folder also includes another file, cutline-3-column-right-11), which does not show up when I download Cutline 3 column split.

    Therefore I’ve been reloading the wrong file. But where do I find the correct one? And do I have to reinstall and/or uninstall from the dashboard?

    Thread Starter rstritmatter

    (@rstritmatter)

    Thanks SimonJ,

    I cut the code as instructed.

    It’s here: https://wordpress.pastebin.ca/926639

    SimonJ

    (@simonj)

    You can’t re-install original file with the dashboard… You should re-upload the original index.php file from the theme via ftp…

    … Or delete everything in the theme editor and copy/paste the content of the original file from a decent text editor…

    There was no endwhile at the end of your loop… And you probably messed someting with the conditional tags in the top of your file…

    I modify your code… Juste delete everything in index.php and paste the code from there :

    https://wordpress.pastebin.ca/926669

    This should do the trick to start on a fresh new base…

    S.

    Thread Starter rstritmatter

    (@rstritmatter)

    Thanks very much for the help, Simon. However, I regret to report that the same error is still appearing. I followed the second set of your instructions. I stripped out the code in the index file in the cutline-3-column-split-11 folder, and pasted in the new code, but no go….

    Any other ideas?

    SimonJ

    (@simonj)

    Paste the code you have now in index.php in the pastebin and give me the link…

    S.

    Thread Starter rstritmatter

    (@rstritmatter)

    Hi again.

    I think I realized what I’ve done wrong. I wasn’t watching the path carefully, and was in the wrong index page all along.

    Here is the link to the new code from the correct file:

    https://wordpress.pastebin.ca/926829

    You’ll notice it has the syntax error identified by the error message on the site. I tried clipping out that error and saving the file but simply recieved another error message.

    Thanks again for your assistance, SimonJ!

    Thread Starter rstritmatter

    (@rstritmatter)

    I reposted it as I didn’t get the whole file:

    https://wordpress.pastebin.ca/926852

    SimonJ

    (@simonj)

    Well…

    The template code you pasted do not contain a loop…

    Are you tatally sure this is the one you use now ???

    Did you try to just cut and paste the code I gave you earlyer in this thread ?

    Just cut and paste this code in your index.php :

    https://wordpress.pastebin.ca/926669

    S.

    Thread Starter rstritmatter

    (@rstritmatter)

    Success!

    Sj, you have made me a happy man.

    I don’t know what I was doing wrong before; I think I had more than one themes folder uploaded to the site, two of them to the wrong directory, and I was trying to replace those index pages. In any case, after I very deliberately followed your instructions one more time, everything worked like a charm.

    Thanks for your patience. You’re a credit to the community.

    SimonJ

    (@simonj)

    Kewl.

    Get rid of the theme folders you don’t use.

    And as a rule of thumb, when you work on a specefic theme, keep the original file in a directory on your computer, and make a copy in another directory for the uploads/downloads while you are workin.

    You should have a “workin” copy of the theme and an “original” one.

    May I suggest that you mark this thread as “resolved” ?

    S.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Syntax Error’ is closed to new replies.