Site crashing
-
[ Moderator note: moved to How-to and Troubleshooting. ]
I inserted this code to make users return to homepage upon logging out:
add_action(‘wp_logout’,’go_home’);
function go_home(){
wp_redirect( home_url() );
exit();
}I inserted it at the end of the theme functions section, saved it and it worked great. Then I fooled with it to see if I could duplicate the function for logging in, and when I saved it again I got this:
Fatal error: Cannot redeclare go_home() (previously declared in /home1/accountadmin/public_html/wp-content/themes/mh_newsdesk/functions.php:124) in /home1/accountadmin/public_html/wp-content/themes/mh_newsdesk/functions.php on line 132
So I deleted all the code, making the file exactly as it was before I touched it, and when I tried to resave I got the same error. Now there is no way to access anything to do with the site or my dashboard without getting that error!
The topic ‘Site crashing’ is closed to new replies.