• Resolved One Frame Fotografie

    (@marloes_pareren)


    Today I was working on my website and added a code to function.php because my admin bar was no longer showing on the website itself:
    [codesyntax lang=”php” lines=”fancy”]
    function my_function_admin_bar($content) {
    return ( current_user_can(“administrator”) ) ? $content : false;
    }
    add_filter( ‘show_admin_bar’ , ‘my_function_admin_bar’);
    [/codesyntax]

    When I saved this I got a white screen, I tried going back a page and delete the code but this didn’t seem to work, I also get a white screen on my website : http://www.oneframe.nl.
    I am a complete newbie with everthing that goes into making a website and have no clue what to do now.
    I do have a ftp program (filezilla) and know how to get into oneframe.nl/phpmyadmin. I also have made a dropbox backup a while ago.
    Is there any way to delete the code I added to function.php?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Get a fresh copy of the theme you’re using, and take it’s functions.php to replace the one you edited to restore it to its original setting.

    Of course, if there is other code in that file you edited, then those changes will be lost as well.

    Never work directly on a live site, never change theme files (but work with a child theme instead), let alone changing theme files on a live site. Especially if you’re a self-declared “complete newbie”.

    Thread Starter One Frame Fotografie

    (@marloes_pareren)

    I finally removed the whole themefolder from y website using filezilla, this worked! I then installed it again and this seems to have repaired the website.
    I tried using a childtheme in the past but this didn’t seem to work with this theme, when I activated the childtheme the website looked very strange and nothing like the normal one. I probably did something wrong here but I don’t know what.
    Thank you anyway for your help.

    I’m quite new to WP too, but one hint when activating a child-theme: you need to go again to Appearance/Menus and choose a menu which is the Main menu (checkbox under the menu). If you don’t do this then the menu is usually not shown after the child-theme is activated. This might make you scared that something went completely wrong 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Help! My website crashed’ is closed to new replies.