WordPress.org

Support

Support » Themes and Templates » [Resolved] Parse error on wordpress site and cant modify!!!

[Resolved] Parse error on wordpress site and cant modify!!!

  • I was working on wordpress functions.php, try to register a sidebar.

    However, after I add the code, the error message come up “Parse error: syntax error, unexpected T_STRING, expecting ‘)’ in /home/jasmine/public_html/theimaginationspot.com/wp-content/themes/Maya/functions.php on line 28”.

    Then I delete the code where I added, and click update, but the error message still appear!

    Now I can’t even go to other pages! What am I suppose to do!!

    Please help!!

Viewing 10 replies - 1 through 10 (of 10 total)
  • WPyogi

    @wpyogi

    Forum Moderator

    You’ll need to use FTP access to deactivate your theme – find and change the name on the theme’s folder:

    wp-content
        themes
           Maya.HOLD

    Then once you are logged in again, reinstall the theme, or ask the developers of the theme for help with the change you are trying to make.

    can i just replace the function.php file?

    WPyogi

    @wpyogi

    Forum Moderator

    Certainly worth trying, but since you are using a commercial theme (we do not have access or support those), you may need to ask the developers of the theme for additional help with the theme issue.

    Moderator Andrew Nevins

    @anevins

    Forum moderator

    Replace it with the default functions.php file? I don’t see why not.

    I mean the theme I purchase will contain function.php right? Can I use that one to replace the existing wrong one?

    WPyogi

    @wpyogi

    Forum Moderator

    Yes, you should be able to replace it in the theme’s folder.

    why this problem occur? I mean there’s syntax error on function.php, and you can’t go back to update it?

    WPyogi

    @wpyogi

    Forum Moderator

    Probably that the site crashed – and it’s not actually changing when you try to correct it.

    BTW, you should generally avoid modifying theme files at all – are you aware that your changes will be lost when the theme is updated?

    A better approach is: http://codex.wordpress.org/Child_Themes

    Thank you for your suggestions! I will try child theme!

    I will do the FTP first and see how it goes.

    If it doesn’t work, maybe I need to go back to ask you.

    OK, I went to the FTP and replace the functions.php file, it works.

    Thanks for the help!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Resolved] Parse error on wordpress site and cant modify!!!’ is closed to new replies.
Skip to toolbar