• Resolved jh1639

    (@jh1639)


    My site is set up with the woocommerce storefront theme. Everything was working perfectly until I tried a new piece of code. I am working on trying to remove breadcrumbs, so I put this code in functions.php just to see if it would work. (I know I’m supposed to use a child theme).

    add_action( 'init', 'jk_remove_woo_wc_breadcrumbs' );
    function jk_remove_woo_wc_breadcrumbs() {
        if ( is_woocommerce() || is_cart() || is_checkout() )
            remove_action( 'woo_main_before', 'woo_display_breadcrumbs', 10 );
        }
    }

    Now the entire site has completely disappeared. When I go to the website it is completely blank, and so is the log in page so I can’t even log in. How do I fix this??

    website is:

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter jh1639

    (@jh1639)

    David_G

    (@questas_admin)

    It looks like you have one to many } at the end.
    You will need to edit the file from your host file manager or FTP

    Thread Starter jh1639

    (@jh1639)

    To fix the problem of not being able to log in, view, or edit the theme in any way, I logged into my ftp client and found the file functions.php where I had put this new code.

    I opened the file in a code editor, deleted the new code, and then overwrote the file in the ftp with this. It fixed the site immediately.

    Before I did this, I tried to only remove the extra } in the code to see if it would work; this code did not work at all on re-uploading it so I removed it completely.

    David_G

    (@questas_admin)

    The best way to make changes like this to a theme is to use a child theme, so your tweaks won’t be overwritten when updating the theme. Here are some guides in case you haven’t made one before:
    https://codex.www.ads-software.com/Child_Themes
    https://op111.net/53/

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Help! My site disappeared completely and I can't log in’ is closed to new replies.