• I made a page not so long ago, and today I tried using google analytics, I pasted the code in the functions.php, and now my website isn’t loading, it wont open. Was working fine till today that I pasted that code. Can anyone help? My website is: https://www.soloparadama.com

Viewing 4 replies - 1 through 4 (of 4 total)
  • There is nothing in the source code so it will be hard for the community to see it. I would suggest turning on WP_DEBUG to see if that gives you a clue.

    You can do this by adding this line to wp-config.php in your root folder:

    define( 'WP_DEBUG', true );

    You can read more at https://codex.www.ads-software.com/Editing_wp-config.php#Debug if curious about WP_DEBUG.

    My best *guess* is that you pasted the Google Analytics code directly into functions.php instead of into a function inside functions.php. That would create a PHP error which would result in a blank screen, but it could be something else.

    Thread Starter soloparadama

    (@soloparadama)

    Thats what I did… Pasted directly to functions.php…

    Thread Starter soloparadama

    (@soloparadama)

    But it wont let me do anything, its all blank, the website and the wp-admin, can’t do anything :/

    Ok, functions.php is all PHP code so if you paste HTML into it it will break. What you want to do is paste it into your theme’s header.php file just before (or some themes it works ok just after) the code

    <?php wp_head(); ?>

    Make sure it is not inside the <?php tag or else it will break.

    Or you can use a plugin. We like Google Analytics Dashboard for WP since it adds a dashboard of Google Analytics facts to your WP Admin. It’s at https://www.ads-software.com/plugins/google-analytics-dashboard-for-wp/ and is free just like WordPress!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘My page isn't loading’ is closed to new replies.