• Resolved geoffkb

    (@geoffkb)


    I’m working on a company site which has a custom theme which my predecessor wrote. It seems to work fine online, but when I try to use it locally I get this error “Parse error: syntax error, unexpected end of file in C:\xampp2\htdocs\f******r\wp-content\themes\f*****r\functions.php on line 46”

    If I change to another theme locally it works fine. I don’t have time to learn php right now. Is there any way I can easily find and fix the errors in the the custom theme, if that’s what’s causing the issue?

    I wonder if it might be related to the WordPress version. I’m using WordPress v3.8.1 locally, version 3.6 online. I’m scared to update the online WordPress version in case it screws up their site.

    I could create the new pages online and not publish them until they’re approved, but I’d rather do it offline, especially since I’m trying to impress them. Bringing down their site won’t get me any brownie point.

    Any suggestion would be much appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • There’s no easy way to locate the code that is causing the problem with these kinds of errors. You’re going to have to look through the whole file to try and find out where a conditional loop wasn’t closed.

    And, no, it has nothing to do with the WordPress version. It’s a straight forward coding error.

    Hello geoffkb

    Check whether the code uses <?php or <?

    If it is <? then you might need to enable short open tags in your local setup. It is advisable to replace <? to <?php

    Thread Starter geoffkb

    (@geoffkb)

    OMG! Thanks for the responses, that fixed it.

    I replaced <? with <?php (thank you Dreamweaver) and of course it went to the next error which was in another file. I fixed that and then the next, and voila!

    It took two passes to find and replace all intances because if you just do a straight replace you can’t differentiate between “<?” and “<?php” so I ended up with “<?php php” the second pass replaced “<?php php” with “<?php”.

    Thank you SO much for your help!

    You are welcome

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom Theme error on localhost’ is closed to new replies.