[Support request] Adding anything to child functions.php causes critical error

Home Forums Support [Support request] Adding anything to child functions.php causes critical error

Home Forums Support Adding anything to child functions.php causes critical error

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2025577
    loadingartist

    Hello, I’m trying to add an official code snippet to my child theme’s functions.php file, but it always breaks my site with a critical error no matter what.

    I realise support doesn’t cover custom functions, but it isn’t the code (and it’s from the official Woocommerce site, here’s a link to the raw code: https://gist.githubusercontent.com/woogists/11ae5067dee442682ce2895f7b1645c2/raw/c24f6c763cf16ae3811cc226ee89b718c1341ff9/wc-exclude-product-category-from-shop-page.php )

    From the automatic emails WordPress sends me, the first error I got was apparently:
    An error of type E_PARSE was caused in line 8 of the file /home/exoloada/loadstore/wp-content/themes/generatepress_child/functions.php. Error message: Unclosed ‘{

    and then later trying the same code again, this time the error I got was:
    An error of type E_PARSE was caused in line 8 of the file /home/exoloada/loadstore/wp-content/themes/generatepress_child/functions.php. Error message: Unclosed ‘(

    The strange thing is that there are no unclosed brackets/parenthesis anywhere in the file, and line 8 of the functions file is just a blank line from GeneratePress’ default comment.

    I’ve tried disabling all my plugins, but the problem persists.

    #2025964
    David
    Staff
    Customer Support

    Hi there,

    can you share a screenshot of the child theme functions.php ?

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