Archived topic
Website down after editing functions.php
3 replies · Started by Leon on December 17, 2016
Hi Tom,
I know it's my fault...but it's kind of urgent and I need help from you if possible.
I added one line of code: add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 1;' ), 20 ); to my functions.php file in the hope of changing the number of products to show per page in my woocommerce plugin product display page, and after that, my website is down. The whole website can't be visited any more.
I changed back to the default file, and it still doesn't recover.
Is there anyway I can get my website back to work please?
Thank you
Leon
Hi Leon,
You'll need to access your site via FTP or File Manager (in your hosting cPanel).
Navigate to that file and remove the code, then save.
Then your website should be back.
Let me know :)
Hi Tom,
Thank you for your help. It doesnt work to delete that line of code. However, luckily I have a backup up of the file and replaced it with the one. After that, I upgrade my theme and all are back to work.
Thanks again
Leon
Glad you got it back up :)