WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Parse error on wordpress site and cant modify!!! (11 posts)

  1. kathykehuang
    Member
    Posted 11 months ago #

    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!!

  2. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

    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.

  3. kathykehuang
    Member
    Posted 11 months ago #

    can i just replace the function.php file?

  4. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

    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.

  5. Andrew
    Forum Moderator
    Posted 11 months ago #

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

  6. kathykehuang
    Member
    Posted 11 months ago #

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

  7. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

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

  8. kathykehuang
    Member
    Posted 11 months ago #

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

  9. WPyogi
    Volunteer Moderator
    Posted 11 months ago #

    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

  10. kathykehuang
    Member
    Posted 11 months ago #

    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.

  11. kathykehuang
    Member
    Posted 11 months ago #

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

    Thanks for the help!

Reply

You must log in to post.

About this Topic

Tags

No tags yet.