Frontend not loading but backend is accessible

I’m not sure when this started but the front end will not load. It’s just a blank screen. I can log into the dashboard and see the pages and edit like normal. When I am logged into the dashboard I can open a new tab and view the frontend of my site but when I log out of the dashboard and then try to see the frontend of my site the page is blank and won’t load. Please help.

I’ve deactivated all plugins and the header loads but nothing else. I’ve also changed themes and same problem. Not sure what to do or how to fix this.

Here is what I have tried already when chatting with Wordpress Support:
I have already edited the wp-config file. I changed the debug line to true. I refreshed my site no errors show.

If I keep all plugins active but switch to twenty seventeen theme it works. Then I switch to X child theme and it won’t load again. I switched to the main X theme and it loaded but did not load correctly. I deactivated all plugins and then I get this error:

Fatal error: Call to undefined function is_product_tag() in /home/cncprosintl/public_html/wp-content/themes/x/framework/functions/global/conditionals.php on line 177

If I reactivate the X-Google Analytics plugin the error goes away but page is still blank.

With only X-Google Analytics and Cornerstone plugins active the page is blank when I’m on X-Child Theme. When I switch to Twenty Seventeen it loads, when I switch to X-Theme it loads but header and footer looks weird.

I deactivated all plugins again and page is still blank when on X-Child Theme but works on twenty seventeen theme.

And again… I can log into cncprosintl.com/wp-admin just fine and edit my site. If I’m logged into the dashboard then I can open a new tab to view my site and it looks fine. It’s only when I’m not logged into the dashboard.

Wordpress support says the problem is with my theme, and to please consult with the theme developer.

Please help!

Hello There,

Thanks for writing in! Do you have any custom codes in your child theme’s functions.php file? Please post the complete content of the functions.php file in your next reply. I also noticed that you inserted an invalid Google Analytics code: http://prntscr.com/ftevua

Please have it updated and make use of this code instead:

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-101908869-1', 'auto');
  ga('send', 'pageview');

</script>

Hope this helps. Please let us know how it goes.

Thank you, that fixed the problem. I’m not sure how the analytics code changed but so glad you helped me fix the problem. Thanks again!

You are welcome @cncpros :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.