My client has a website and it was on blogger.com, the client insisted on keeping all content and layout but wanted to migrate over to WP. I am placing Adsense ads and noticed that on the home page the ads don't show. The inner pages the ads show fine. I placed 2 ads, 1 async and 1 not. labeled 1 & 2 . I have it set to show orange if the ads are not shown. On the home page you see the orange. On any inner page you see the ads. The only difference in code is the slideshow. I removed the slideshow, still no ads. Anyone familiar with Javascript or Jquery may be able to quickly spot this issue, it may not be what I think it is. I already know the logo is dated, and the layout is terrible. Not asking about that. The client wants this layout and this logo. Any help on this is appreciated, I cannot figure out why the ads will not show. http://eddieruble.com/etw/
Have you tried to separate those structures in two separate boxes on the first page ? Try and code them as two separated objects so they don't get conflicted. Another suggestion would be to try a different slideshow plugin, i know that Feature Content Slider is popular, but try and see if with another plugin you are going to encounter the same problem. If you do, than something in wrong there on the boxes. If not, something is wrong with the plugin.
What is bugging me now, is I stripped down the WP so that the index.php only said include footer. Inside footer.php I placed the code for ad 1 and ad 2. Both show the backup color and not the ad. This is simply crazy. The slideshow is not even a plugin, it is hardcoded into the mainindex.php
Hmm. Have you tried adding the code somewhere else in the page to see if it functions properly (sidebar or header, just to test it) ?
Yes, I have tried everything that is obvious. When I insert the code on a "Page" ads show everytime. When I put them on the index, or "post" pages no ads show at all.
You've said that the slideshow is not even a plugin, it is hardcoded into the mainindex.php. That's not very efficient i would say. Have you tried using it separately ?
Now your going off the main point. This is a recreation of a blogger.com website. I took the exported XML file and chopped it up into a WP theme. The client wanted his slideshow to show 5-6 slides which never change. and slides 6-12 are pulled and created using the WP loop. The slideshow is irrelevant to this issue, as I said in the original post, I can remove the entire slideshow, JS and all and the ads won't show. Ill even do it right now just for sake of this thread.
Ok my index.php now consists of <?php get_footer(); ?> and no other code or text. my footer.php now consists of <style> #pas{ width:400px; height:400px; } </style> <div id="pas"> 1 <script type="text/javascript"> google_ad_client = "ca-pub-0679394713955627"; google_ad_slot = "6480865340"; google_ad_width = 728; google_ad_height = 90; </script> <!-- test --> <script type="text/javascript" src="//pagead2.googlesyndication.com/pagead/show_ads.js"> </script> 2 <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- test3 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-9158637352925372" data-ad-slot="8566397116" data-ad-format="auto"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> Code (markup):
http://eddieruble.com/etw/ Now you can see that I have tried all of the obvious And my source code looks like this <style> #pas{ width:400px; height:400px; } </style> <div id="pas"> 1 <script type="text/javascript"> google_ad_client = "ca-pub-0679394713955627"; google_ad_slot = "6480865340"; google_ad_width = 728; google_ad_height = 90; </script> <!-- test --> <script type="text/javascript" src="//pagead2.googlesyndication.com/pagead/show_ads.js"> </script> 2 <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- test3 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-9158637352925372" data-ad-slot="8566397116" data-ad-format="auto"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> Code (markup):
To anyone interested, I just changed the homepage from recent posts to a static page since the ads worked on pages. When I change the homepage to any page, the ads no longer work on the page where they used to work, I change it back to recent posts and navigate to that page that was the homepage and the ads work again.
So for a test I decided to add the same ad code to the footer of the default WP themes - Twenty Thirteen, Twenty Fourteen, Twenty Fifteen. On all of the themes the ad shows the backup color on home or index.php when you navigate to the inner pages or a post page, the ad shows perfect. At first I was beginning to think it was my functions.php for my custom theme. But no way did I edit all of these themes.
To anyone who may have been following along, My conclusion here is that my client set his adsense account up for usage in English, and he is using a language to write a good majority of the blog that is unsupported by adsense. I copied and pasted the exact same blog code and made a new blog using all English, all ads are showing 100%. My conclusion is his writing mostly in an unsupported language is the cause. You can see below. http:// ethiopianthisweek. com/ Anyone care to weigh in
Just a follow-up, if you navigate to his page, along the top navigation there is a link to "mission statement" & "Contact Us" When you goto these pages written in English you can see his ads show fine. http:// ethiopianthisweek. com/mission/