[Resolved] Website down after editing functions.php

Home Forums Support [Resolved] Website down after editing functions.php

Home Forums Support Website down after editing functions.php

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #255693
    Leon

    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

    #255713
    Tom
    Lead Developer
    Lead Developer

    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 ๐Ÿ™‚

    #255886
    Leon

    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

    #255936
    Tom
    Lead Developer
    Lead Developer

    Glad you got it back up ๐Ÿ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.