WordPress.org

Forums

Edited functions.php, now site is blank (5 posts)

  1. raees
    Member
    Posted 7 months ago #

    I edited the functions.php and the site went blank, can someone find whats wrong in it and help fixing it.heres the functions.php

    [code moderated - follow the forum guidelines for posting code - http://codex.wordpress.org/Forum_Welcome#Posting_Code - and use the http://pastebin.com/

  2. Tada Burke
    Member
    Posted 7 months ago #

    That's a very long file. Can you please narrow it down to what you edited specifically? Do you also have a backup of your functions.php file you can compare to the edited version?

  3. @raees: There's no way anyone here can parse that file for errors.

    Use FTP to replace the file with a fresh, unedited copy of functions.php and then keep backup copies of the files you work on.

    See Filezilla and FTP Clients « WordPress Codex. Or use your web host's file manager in your control panel.

  4. raees
    Member
    Posted 7 months ago #

    ok, the problem is I tried adding this snippet http://pastebin.com/SENBiq8s at the end of the functions.php and the site went blank, removing it fixes the problem, but I want to use that snippet.

  5. Rajat Chodhary
    Member
    Posted 7 months ago #

    Hi Raees,
    Pasting other code without proper information - how it work and how it will affect your website. Is not considered as good coding practice.

    If you want to add that code in your website. I suggest you that you should create a file and an includes folder in your theme directory. Then, parse that include file from there. Using this way, you will have your website intact.

    require_once ( get_stylesheet_directory() . '/includes/gravitywiz.inc.php');

    And, please go to http://gravitywiz.com/support/ forum, and start a new thread for support. We can help you with WordPress only. :)

Reply

You must log in to post.

About this Topic