• Ok, I could about die right now. I’ve been working on this site for a very long time and thought I could make a small modification to add buttons shortcode. Well after copying and pasting the existing code into a .txt file as a back up, I placed the code where I thought it was supposed to go and got some strange code on the top of my admin area. Decided I didn’t want to mess anything up and pasted the original code back into the functions.php and now am getting a syntax error and can’t get back to where I was…. HELP

    The error I get is “Parse error: syntax error, unexpected ‘<‘ in /data/20/1/148/112/1963275/user/2143947/htdocs/wp-content/themes/graphene/functions.php on line 2383”

    the site is located at https://www.ketsdeverconstruction.com

    Any help would be greatly appreciated!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Your only real option is to upload a copy of the original functions.php file from a fresh download of Graphene.

    Thread Starter rseaver06

    (@rseaver06)

    I was afraid of that. Is that going to undo any of the changes I’ve made? Also, any idea why this would happen if I directly copied and pasted the original code as a back-up?

    Is that going to undo any of the changes I’ve made?

    Yep – that’s why we try to advise people to create child themes whenever possible. All we can say about your current situation is that you have still either added – or omitted – something small but critical in your theme’s functions.php file.

    esmi is right. This is exactly why we strongly encourage the use of a child theme for site modifications.

    Also, you can use the Graphene support forum to benefit from a large community of all Graphene users. I moderate on the forum, and we give specific instructions for properly setting up a child theme.
    https://forum.khairul-syahir.com/graphene-wordpress-theme/

    Thread Starter rseaver06

    (@rseaver06)

    Sorry guys, I’ve been trying to figure out child themes for a while for this very reason but I’ve just been a little stumped. So here’s another interested bit, when I look at the code I copied OUT of the functions.php before editing it there are thousands of lines of code. The fresh functions.php has less than a hundred. What’s going on there?

    The number of functions in the main functions.php file was reduced in the last version because it became overwhelmingly difficult to maintain.

    Instead, it’s broken into about ten different functions files, dependent on their specific functionality, and referenced from the main functions.php file.

    Yet another reason to be using a child theme for modifications ??

    Thread Starter rseaver06

    (@rseaver06)

    Ok, thanks so much Josh. Since there’s been a drastic change to the functions I’m going to have to completely re-install the theme not just the functions.php now aren’t I?

    Well, staying up to date with a theme is always a good practice. Especially with themes in active development, such as Graphene.

    The last two versions of Graphene have really altered the functionality and customization possibilities (ie custom column widths, improved functions, etc.).

    I’m not sure which version you are using… but I would suggest updating to the latest version before beginning your customizations. And also make sure you do them from the child theme.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Help! Broke my Graphene themed site trying to work with the "functions.php" file’ is closed to new replies.