Support » Fixing WordPress » Editing functions.php file has caused my site to crash

  • Whilst trying to install a megamenu widget i have somehow crashed my website. I followed the instructions detailed below and then removed all code after the crash via my control panel file manager.

    Here’s the code I added (and then removed)

    Go into your Wp-Admin
    Go to Appearances >> Editor
    Find the file functions.php
    Before the closing ?>, add the following lines of code:
    if ( function_exists(‘register_sidebar’) ){
    ‘name’ => ‘my_mega_menu’,
    ‘before_widget’ => ‘<div id=”my-mega-menu-widget”>’,
    ‘after_widget’ => ‘</div>’,
    ‘before_title’ => ”,
    ‘after_title’ => ”,
    Now edit the header.php file
    Find the location where you want to place the menu and add the following code to the header.php file:
    <?php /* Widgetized sidebar */
    if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘my_mega_menu’) ) : ?><?php endif; ?>
    Save all the changes, and you should now be able to go into Appearances >> Widgets >> My_Mega_Menu_Widget and then drag the jquery_mega_menu widget into the my_mega_menu_widget box.

    Is there a restore option or am I looking at reinstalling the theme and recreating the site?

    my website address is

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Jose Castaneda



    Just rename the theme’s folder and it will revert back to the default theme.

    ps. I highly suggest you update your version of WordPress. 😉

    🙂 I will if I manage to get in – new to this – will give that a try – thanks

    that hasn’t worked unfortunately – I am using Custom Community by Themekraft and have renamed its folder custom-community-1 but still nothing?

    you can not just un-do what you have added?

    Yes I did but still have white screen – no error messages and when I inspect the element it looks as though the header isn’t loading?


    can now get into wordpress admin and view pages etc but as soon as I choose ‘view page’ or ‘visit site’ I am still presented with a white screen.

    Still No Joy – Have deleted and re-installed theme to no avail – tech support not able to offer coding assistance other than the following error message….

    Parse error: syntax error, unexpected ‘}’ in /home2/designb2/public_html/wp-content/themes/custom-community/functions.php on line 412

    …Which when I check the coding there isn’t even a ‘{‘ on that line!!!!

    I can see my content (pages, posts etc) in the wordpress side but only a white screen online. I am about to rebuild my entire site just because of a rouge ‘{‘…………….someone must know how to fix this 🙁

    Any Id

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Editing functions.php file has caused my site to crash’ is closed to new replies.