1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Possible conflict between slideshow and adsense

Discussion in 'Programming' started by KangBroke, Nov 10, 2015.

  1. #1
    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.
    SEMrush
    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/
     
    Last edited: Nov 10, 2015
    KangBroke, Nov 10, 2015 IP
    SEMrush
  2. Linda March

    Linda March Peon

    Messages:
    24
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    3
    #2
    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.
     
    Linda March, Nov 11, 2015 IP
  3. KangBroke

    KangBroke Notable Member

    Messages:
    1,025
    Likes Received:
    58
    Best Answers:
    4
    Trophy Points:
    215
    #3
    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
     
    KangBroke, Nov 11, 2015 IP
  4. Linda March

    Linda March Peon

    Messages:
    24
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    3
    #4
    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) ?
     
    Linda March, Nov 11, 2015 IP
  5. KangBroke

    KangBroke Notable Member

    Messages:
    1,025
    Likes Received:
    58
    Best Answers:
    4
    Trophy Points:
    215
    #5
    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.
     
    KangBroke, Nov 11, 2015 IP
  6. Linda March

    Linda March Peon

    Messages:
    24
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    3
    #6
    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 ?
     
    Linda March, Nov 11, 2015 IP
  7. KangBroke

    KangBroke Notable Member

    Messages:
    1,025
    Likes Received:
    58
    Best Answers:
    4
    Trophy Points:
    215
    #7
    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.
     
    KangBroke, Nov 11, 2015 IP
  8. KangBroke

    KangBroke Notable Member

    Messages:
    1,025
    Likes Received:
    58
    Best Answers:
    4
    Trophy Points:
    215
    #8
    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):
     
    KangBroke, Nov 11, 2015 IP
  9. Linda March

    Linda March Peon

    Messages:
    24
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    3
    #9
    Well, I have no idea for the moment. Let's see if other DP user can help you out with this issue.
     
    Linda March, Nov 11, 2015 IP
  10. KangBroke

    KangBroke Notable Member

    Messages:
    1,025
    Likes Received:
    58
    Best Answers:
    4
    Trophy Points:
    215
    #10
    http://eddieruble.com/etw/


    Now you can see that I have tried all of the obvious

    [​IMG]



    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):
     
    Last edited: Nov 11, 2015
    KangBroke, Nov 11, 2015 IP
  11. KangBroke

    KangBroke Notable Member

    Messages:
    1,025
    Likes Received:
    58
    Best Answers:
    4
    Trophy Points:
    215
    #11
    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.
     
    KangBroke, Nov 11, 2015 IP
  12. KangBroke

    KangBroke Notable Member

    Messages:
    1,025
    Likes Received:
    58
    Best Answers:
    4
    Trophy Points:
    215
    #12
    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.
     
    KangBroke, Nov 12, 2015 IP
  13. KangBroke

    KangBroke Notable Member

    Messages:
    1,025
    Likes Received:
    58
    Best Answers:
    4
    Trophy Points:
    215
    #13
    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
     
    KangBroke, Nov 23, 2015 IP
  14. KangBroke

    KangBroke Notable Member

    Messages:
    1,025
    Likes Received:
    58
    Best Answers:
    4
    Trophy Points:
    215
    #14
    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/
     
    KangBroke, Nov 23, 2015 IP