Title: Google Adsense and WordPress
Last modified: August 8, 2017

---

# Google Adsense and WordPress

 *  [stratmansblues](https://wordpress.org/support/users/stratmansblues/)
 * (@stratmansblues)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/google-adsense-and-wordpress/)
 * Google Adsense is putting a banner in my navigation menu automatically. Is there
   anyway, I can move it underneath between the menu and the content? It looks bad
   right now. Thanks in advance.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [8 years, 11 months ago](https://wordpress.org/support/topic/google-adsense-and-wordpress/#post-9391665)
 * Are you using some plugin to add adsense to your site? I don’t see any ads when
   I look.
 *  Thread Starter [stratmansblues](https://wordpress.org/support/users/stratmansblues/)
 * (@stratmansblues)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/google-adsense-and-wordpress/#post-9391685)
 * Using just the script tag they provide in the head section of the header.php 
   file.
 *     ```
       <script>
         (adsbygoogle = window.adsbygoogle || []).push({
           google_ad_client: "ca-pub-7282003640012354",
           enable_page_level_ads: true
         });
       </script>
       ```
   
 *  [Radu](https://wordpress.org/support/users/broseph/)
 * (@broseph)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/google-adsense-and-wordpress/#post-9391723)
 * Hello!
 * Remove the code from there and use this plugin: [https://wordpress.org/plugins/insert-headers-and-footers/](https://wordpress.org/plugins/insert-headers-and-footers/).
   Add the code in the head section of the plugin.
 *  Thread Starter [stratmansblues](https://wordpress.org/support/users/stratmansblues/)
 * (@stratmansblues)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/google-adsense-and-wordpress/#post-9391732)
 * Blade, I just tried that and got the same result.
 * [https://pasteboard.co/GEIyoF2.png](https://pasteboard.co/GEIyoF2.png)
 *  [luckychingi](https://wordpress.org/support/users/luckychingi/)
 * (@luckychingi)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/google-adsense-and-wordpress/#post-9391835)
 * This code needs to be where you want the ad to appear
 * can you paste the last few lines of the header.php file?
 *  Thread Starter [stratmansblues](https://wordpress.org/support/users/stratmansblues/)
 * (@stratmansblues)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/google-adsense-and-wordpress/#post-9392220)
 *     ```
       <?php
       /**
        * The header for our theme.
        *
        * This is the template that displays all of the <head> section and everything up until <div id="content">
        *
        * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
        *
        * @package Bhari
        * @since   1.0
        */
   
       ?><!DOCTYPE html>
       <?php bhari_html_before(); ?>
       <html <?php language_attributes(); ?>>
       <head>
       <?php bhari_head_top(); ?>
       <meta charset="<?php bloginfo('charset'); ?>">
       <meta name="viewport" content="width=device-width, initial-scale=1">
       <link rel="profile" href="http://gmpg.org/xfn/11">
   
       <?php bhari_head_bottom(); ?>
       <?php wp_head(); ?>
   
   
         <script>window._epn = {campaign:5338146318};</script>
       <script src="https://epnt.ebay.com/static/epn-smart-tools.js"></script>
   
         <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
       <script>
         (adsbygoogle = window.adsbygoogle || []).push({
           google_ad_client: "ca-pub-7282003640012354",
           enable_page_level_ads: true
         });
       </script>
   
       </head>
   
       <body <?php body_class(); ?>>
   
       <?php bhari_body_top(); ?>
       <div id="page" class="site">
           <a class="skip-link screen-reader-text" href="#content"><?php esc_html_e('Skip to content', 'bhari'); ?></a>
   
           <?php bhari_header_before(); ?>
           <header id="masthead" class="site-header" role="banner">
           <?php bhari_header_top(); ?>
   
               <div class="site-branding">
                   <?php if (is_front_page() && is_home() ) : ?>
                       <h1 class="site-title"><a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a></h1>
                   <?php else : ?>
                       <p class="site-title"><a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a></p>
                   <?php endif; ?>
   
                   <?php $description = get_bloginfo('description', 'display'); ?>
                   <?php if ($description || is_customize_preview() ) : ?>
                       <p class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></p>
                   <?php endif; ?>
               </div><!-- .site-branding -->
   
               <nav id="site-navigation" class="main-navigation" role="navigation">
                   <button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false">
                       <?php if (BHARI_SUPPORT_FONTAWESOME ) : ?>
                           <i class="fa fa-reorder" aria-hidden="true"></i>
                       <?php endif; ?>
                       <?php esc_html_e('Primary Menu', 'bhari'); ?>
                   </button>
                   <?php wp_nav_menu(array( 'theme_location' => 'primary', 'menu_id' => 'primary-menu' )); ?>
               </nav><!-- #site-navigation -->
   
           <?php bhari_header_bottom(); ?>
           </header><!-- #masthead -->
   
           <?php bhari_header_after(); ?>
   
           <?php if (get_header_image() ) : ?>
           <div class="custom-headers">
               <a href="<?php echo esc_url(home_url('/')); ?>" rel="home">
                   <img src="<?php header_image(); ?>" width="<?php echo esc_attr(get_custom_header()->width); ?>" height="<?php echo esc_attr(get_custom_header()->height); ?>" alt="">
               </a>
           </div>
           <?php endif; // End header image check. ?>
   
           <?php bhari_content_before(); ?>
           <div id="content" class="site-content">
           <?php bhari_content_top(); ?>
       ```
   
 *  Thread Starter [stratmansblues](https://wordpress.org/support/users/stratmansblues/)
 * (@stratmansblues)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/google-adsense-and-wordpress/#post-9393076)
 * Any workarounds for this issue?

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Google Adsense and WordPress’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 4 participants
 * Last reply from: [stratmansblues](https://wordpress.org/support/users/stratmansblues/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/google-adsense-and-wordpress/#post-9393076)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
