Problem with adsense code

by 10 replies
11
Hi

When I went to check on my adsense ads on my site, I noticed that the adsense code was showing, not the actual ads themselves. They had been shown in the past.

I have tried everything that I can think off but no joy.

Could anyone help me with this, please?

I have attached a screenshot of my homepage.

Many thanks,

Arny



#website design #adsense #code #problem
  • There's some strange stuff between the <head> and </head> portion of your site that may be interfering with the javascript that displays the ads.

    PHP Code:
    <meta name="twitter:description" content="Facts About Smoking

    (adsbygoogle = window.adsbygoogle || []).push({});

    We all know that smoking is bad for us, but do we really know the true facts abo(...)"
    >
    <
    meta name="DC.Title" content="Facts About Smoking" ><meta name="DC.Creator" content="" ><meta name="DC.Description" content="Facts About Smoking

    (adsbygoogle = window.adsbygoogle || []).push({}); 
    I didn't see any ad content at all on the page

    also the fragment
    PHP Code:
    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><br /> 
    is broken, the http: is missing from the URL
    • [1] reply
    • Thanks Robin for your reply.

      I'm not sure what's going on. I can see that strange stuff when I go into the source screen, but when I go into the header.php in WP Editor, it isn't there. :confused:
      • [1] reply
  • Try using filezilla or the code editor in cpanel to edit the header.php

    It would be best to create a child theme if you are going to edit theme files. Child Themes « WordPress Codex
    • [1] reply
    • I have gone into FileZilla and this is all I am getting in the head tags:

      <head>
      <meta charset="<?php bloginfo( 'charset' ); ?>">
      <title><?php bloginfo( 'blogname' ); ?><?php wp_title(); ?></title>
      <link rel="stylesheet" media="all" href="<?php print get_stylesheet_uri(); ?>" />
      <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
      <link rel="profile" href="http://gmpg.org/xfn/11">
      <?php wp_head(); ?>
      </head>
      • [1] reply
  • Can you share your URL please
  • I would think you have a plugin inserting the code or the WP core file may have been modified
  • I don't see anything - code or ads - on the place shown on the screenshot. The ad lower below is working fine for me. Hope you have been able to fix it.
  • Banned
    [DELETED]

Next Topics on Trending Feed