Just another free Blogger theme

BUSINETWORK. Powered by Blogger.

Archives

Featured Posts

Saturday 5 September 2015

Blogger Nnadi Nnaemeka Donatus contacted me few days back to complain that Google ads generated from his hosted Google Adsense account are no longer displaying on the desktop view of his blogspot blog.


I checked his blog and discovered that the ads were ONLY showing on mobile view. I also noticed that his blog keeps redirecting to .blogspot.com.ng. Before I could figure out what's wrong, he sent me another message that the problem has been fixed.

So how?

Copy and paste the code below to the head section of your blog's html. It will stop the redirection and ads will display on the desktop view.

<script type="text/­javascript">
var blog = document.location.ho­stname.split(".");
if (blog[blog.length - 1] != "com") {
var ncr = "http://" + blog[0] + ".blogspot.com/ncr";
window.location.repl­ace(ncr + document.location.pa­thname);
}
</script>

Don't know where to add the code?

==> Sign in to your Blogspot dashboard
==> Go to "Template" > "Edit HTML"
==> Click inside the html
==> Press CTRL F on your keyboard to find </head>



==> Copy the code directly above </head>
==> Click "Save Template"

View your blog and you should see the Google ads.

I hope it works for you.

Thanks to Nnadi Nnaemeka Donatus for sharing this.

Below is a video tutorial that will guide you :

https://youtu.be/lPWoRK1b5zQ



Have fun!



Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque volutpat volutpat nibh nec posuere. Donec auctor arcut pretium consequat. Contact me 123@abc.com

0 comments:

Post a Comment