• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Line of code crashed entire site

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Line of code crashed entire site

This topic is: resolved
  • This topic has 5 replies, 4 voices, and was last updated 12 years, 10 months ago by AnitaC.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • January 19, 2013 at 11:52 pm #13230
    Grimwolf
    Member

    I was working on trying to add Google Analytics to my site. I followed some instructions I found here; http://www.wpbeginner.com/beginners-guide/how-to-install-google-analytics-in-wordpress/
    I was following the part where it says to add this code;

    (won't let me paste the code for some reason, it's found in the section titled Functions.php Method on that page)

    To Functions.php.
    To accomplish this I went into Appearance > Editor > Theme Functions, and posted the code into the very end, immediately after;

    genesis_register_sidebar( array(
    'id' => 'custom-footer',
    'name' => __( 'Custom Footer', 'minimum' ),
    'description' => __( 'This is the custom footer section.', 'minimum' ),
    ) );

    I then went into my Google Analytics account and posted the code that gave me over the "// Paste your Google Analytics code from Step 6 here" line.
    I hit Update File, it starts loading, and boom; the whole site crashes. Nothing will load.
    I was able to get back into that section by hitting Back, and I removed the code I had added and hit Update File again, but it is still crashed. I assume it wasn't able to actually TRY updating the file again since the whole site is already crashed, including the Dashboard.
    Does anyone know how I can fix this, and what the proper way would be to add Google Analytics code to the site?

    January 20, 2013 at 12:32 am #13241
    buddy_boy8403
    Participant

    You don't need to modify the functions.php file to include google analytics code.  Instead, go to wp-admin > Genesis > Scroll to the very bottom and paste your analytics code into the second box from the bottom to have it output in the wp_head() section.

    That's all - your analytics will be set up.

    January 20, 2013 at 9:16 am #13276
    Grimwolf
    Member

    Thanks.
    With that out of the way, does anyone know then how to un-crash my site? The Dashboard is crashed too, so I can't just undo the code change I made. I'm curious how something that simple could have even caused such a massive issue. It's not like I messed with any of the existing code.

    January 20, 2013 at 10:48 am #13282
    Susan
    Moderator

    Read Nick's guide to site recovery tips and tricks here:

    http://designsbynickthegeek.com/tutorials/site-recovery-tips-and-tricks

    January 20, 2013 at 3:55 pm #13338
    Grimwolf
    Member

    Awesome, thank you. Following that guide I was able to open the file in FTP and remove the changes I made there, upload it to the site and it was fixed.

    January 20, 2013 at 3:56 pm #13339
    AnitaC
    Keymaster

    If it was your functions.php file that you were modifying, just copy the functions.php file from your original zip file over to the theme file via FTP and the site should come back.


    Need help with customization or troubleshooting? Reach out to me.

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Line of code crashed entire site’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble