Jump to content
Sign in to follow this  
highreach

Broke my site with functions.php

Recommended Posts

highreach

Downloaded the base theme, tried to edit functions.php. Broke my site. I am stuck. Heres what I am getting: Parse error: syntax error, unexpected $end in /home/colleg49/public_html/gan-bei.com/wp-content/themes/pagelines-template-theme/functions.php on line 35 Any ideas on how to fix this? I can't get to my site. Thanks

Share this post


Link to post
Share on other sites
bxbmedia

@highreach- It sounds like edited the file through wp-admin, and now you can't get back there. You will have to edit that file via ftp or your host's file manager to restore your site's functionality.


gl hf

Share this post


Link to post
Share on other sites
highreach

Here is what I have. I got here by hitting back on my browser and copying what was in the edit box. If anyone has any other methods for getting to these lines of code, please let me know. I am not sure or confident in what I am doing, so the more details, the better. <?php // Setup -- Probably want to keep this stuff... /** * Hello and welcome to Base! First, lets load the PageLines core so we have access to the functions */ require_once( dirname(__FILE__) . '/setup.php' ); // For advanced customization tips & code see advanced file. //--> require_once(STYLESHEETPATH . "/advanced.php"); // ==================================================== //= // ==================================================== // ABOUT HOOKS --------// // Hooks are a way to easily add custom functions and content to PageLines. There are hooks placed strategically throughout the theme // so that you insert code and content with ease. // ABOUT FILTERS ----------// // Filters allow data modification on-the-fly. Which means you can change something after it was read and compiled from the database, // but before it is shown to your visitor. Or, you can modify something a visitor sent to your database, before it is actually written there. // FILTERS EXAMPLE ---------// // The following filter will add the font Ubuntu into the font array $thefoundry. // This makes the font available to the framework and the user via the admin panel.

Share this post


Link to post
Share on other sites
highreach

Thanks Simon. Here is the link: http://paste.pagelines.com/672. Just in case I'm supposed to paste the output: <?php // Setup -- Probably want to keep this stuff... /** * Hello and welcome to Base! First, lets load the PageLines core so we have access to the functions */ require_once( dirname(__FILE__) . '/setup.php' ); // For advanced customization tips & code see advanced file. //--> require_once(STYLESHEETPATH . "/advanced.php"); // ==================================================== //= // ==================================================== // ABOUT HOOKS // // Hooks are a way to easily add custom functions and content to PageLines. There are hooks placed strategically throughout the theme // so that you insert code and content with ease. // ABOUT FILTERS // // Filters allow data modification on-the-fly. Which means you can change something after it was read and compiled from the database, // but before it is shown to your visitor. Or, you can modify something a visitor sent to your database, before it is actually written there. // FILTERS EXAMPLE // // The following filter will add the font Ubuntu into the font array $thefoundry. // This makes the font available to the framework and the user via the admin panel.

Share this post


Link to post
Share on other sites
catrina

If you can't access your Dashboard, the best way to restore it is to copy an unedited version of the functions.php file and use it to overwrite the functions.php file you edited (using FTP).


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
highreach

Thanks Catrina, I have found some other threads about where to find the original functions.php files. The files I have found look different from what I initially had to modify. I am using the "base" theme. Can I use the functions.php from the pagelines zip download found on the launchpad? (it's here: http://paste.pagelines.com/2r4) Thanks

Share this post


Link to post
Share on other sites
Danny

Hi Highreach, Using your favourite FTP client, navigate to the following directory on your site. /wp-content/themes/pagelines-template-theme/ Then open up the functions.php and remove any custom code you added and then save the file. Once the file has saved, refresh your website, you should be able to see your site again and access your dashboard.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
highreach

Sweetness. Site is back. I don't know if it was FTP, but I was able to find that file using the cpanel file navigator. Thanks for your help!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×