Site logo

Archived topic

Problem with Functions.php

3 replies · Started by Christa Hutchins on April 14, 2017

Viewing posts 1–4 of 4

I tried to do something I'm completely unqualified to do ... adding a snippet of code at the end of functions.php I had just updated to the lasted versions of GP and GP Premium and everything was working.

I put a } on the next line below the last end if, then pasted the snippet below that. When hit Update, I got this error:

Parse error: syntax error, unexpected '}' in /home/doanfnkl/public_html/wp-content/themes/generatepress/functions.php on line 730

So I deleted everything I added and tried to update again and got the same error.

Now the site is down and everything I try to do in the Admin panel gets the same error.

How do i fix it?? I'll need step by step instructions, please.

Hi Christa,

PHP can be pretty dangerous sometimes.

What you'll need to do:

1. Login to your hosting control panel (cPanel).
2. Open the "File Manager".
3. Navigation to "wp-content/themes/generatepress/functions.php".
4. Remove the custom code you added and save.

To add PHP in the future, it's best to use a plugin like Code Snippets: https://docs.generatepress.com/article/adding-php/

Also, no need to add that } character.

Hope this helps - if you can't find the file manager, it's best to call your hosting and they should point you in the right direction.

Fixed!! I will never venture to that dark and scary place again! LOL! Thanks for the help, as always :)

And the Code Snippets plug in helped me do exactly what I needed to do!

Glad I could help :)

This archived topic is closed to new replies.