[Resolved] Cant add adsense code between the < Head>and tags

Home Forums Support [Resolved] Cant add adsense code between the < Head>and tags

Home Forums Support Cant add adsense code between the < Head>and tags

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #430207
    Alex

    When i go to Appearance > editor > select theme header (header.php)

    i copy and paste this after the <head>
    <script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({
    google_ad_client: “ca-pub-xxxxxxxxxxx”,
    enable_page_level_ads: true
    });
    </script>

    i get an error and it wont update.

    Unable to communicate back with site to check for fatal errors, so the PHP change was reverted. You will need to upload your PHP file change by some other means, such as by using SFTP.

    #430213
    Alex

    i added the code into the wp_head hook in GP Hooks

    #430230
    Leo
    Staff
    Customer Support

    Glad you figured out!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.