Wordpress Fatal Error Call to Undefined Function Theme SNAFU

518
May 16, 2017, at 09:29 AM

I was trying to edit the code of my WP theme that was installed, and I was trying to take things out to disable a function I wanted to get rid of. I was saving the unedited code and everything so I could put it back if needed but I got a Fatal Error. I never realised messing with any of that code could mess with my actual access to my Wordpress dashboard:

Fatal error: Uncaught Error: Call to undefined function sun_post_lightbox_init() in /homepages/34/d681692875/htdocs/clickandbuilds/Noiiice/wp-content/themes/sun-by-osetin/functions.php:41 Stack trace: #0 /homepages/34/d681692875/htdocs/clickandbuilds/Noiiice/wp-includes/class-wp-hook.php(298): sun_setup('') #1 /homepages/34/d681692875/htdocs/clickandbuilds/Noiiice/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array) #2 /homepages/34/d681692875/htdocs/clickandbuilds/Noiiice/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #3 /homepages/34/d681692875/htdocs/clickandbuilds/Noiiice/wp-settings.php(433): do_action('after_setup_the...') #4 /homepages/34/d681692875/htdocs/clickandbuilds/Noiiice/wp-config.php(83): require_once('/homepages/34/d...') #5 /homepages/34/d681692875/htdocs/clickandbuilds/Noiiice/wp-load.php(37): require_once('/homepages/34/d...') #6 /homepages/34/d681692875/htdocs/clickandbuilds/Noiiice/wp-admin/admin.php(31): require_once('/homepages/34/d...') #7 /homepages/34/d681692875/htdocs in /homepages/34/d681692875/htdocs/clickandbuilds/Noiiice/wp-content/themes/sun-by-osetin/functions.php on line 41

Answer 1

Depending on which kind of hosting you have, you should have access to the site's files by FTP, SFTP, or through the hosting account's web-based file manager. You can use one of those methods to replace the theme's file(s) on the server -- or you can download the copy of that file that you modified, change it to fix the last change you made, and then upload it again.

Theme files are located in wp-content/themes/your-theme-name/.

If you're not sure which type of access you have or which username/password to use to get to the files, the hosting company should be able to help you with that.

Rent Charter Buses Company
READ ALSO
Why is cURL doesn't behave the same as the web browser

Why is cURL doesn't behave the same as the web browser

I'm using cURL to fetch a websiteI can get the login page and use cURL to login sending the credential details over a POST Form successfully

235
Mysqli query doesn't fetch results

Mysqli query doesn't fetch results

I have this code, i would like to print a table with contentIt prints table but the columns are empty

213
how to create a nested lists of categories in Laravel 5?

how to create a nested lists of categories in Laravel 5?

How do i create a nested list of categories in Laravel 5 ?

498
Opencarte 2.3 - add custom fields on order info page (or invoice)

Opencarte 2.3 - add custom fields on order info page (or invoice)

I am trying to add custom fields on order info page / invoice but they are blank

278