Title: Block Ads position
Last modified: March 26, 2020

---

# Block Ads position

 *  Resolved [hathuan12](https://wordpress.org/support/users/hathuan12/)
 * (@hathuan12)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/block-ads-position/)
 * Hi,
 * I’m having an issue with adsense auto ads position. I tried to remove header 
   ads position on Google Adsense settings but it still appears, so there’s any 
   additional code to block ads on header of website?
    Link reference: [https://bakez.vn/en/salted-egg-almond-crisps/](https://bakez.vn/en/salted-egg-almond-crisps/)
 * I’m looking for your reply.
    Thanks and Regards,
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fblock-ads-position%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Theme Author [Veda](https://wordpress.org/support/users/vedathemes/)
 * (@vedathemes)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/block-ads-position/#post-12587100)
 * Hi there,
 * Google auto ads are automatically added using JavaScript on client side. Therefore,
   PHP code snippet will not work in this case.
 * However, at best you can add following CSS to hide ads from your site header,
   
   1. Go to WordPress Dashboard > Appearance > Customize 2. Look for “Additional
   CSS” tab in left sidebar. Click on it. 3. Copy and paste following CSS in left
   text field,
 *     ```
       header#masthead .google-auto-placed {
           display: none !important;
       }
       ```
   
 * 4. Click publish button on top to save your changes.
 * Hope it will help you.
 * Thanks,
 *  Thread Starter [hathuan12](https://wordpress.org/support/users/hathuan12/)
 * (@hathuan12)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/block-ads-position/#post-12587834)
 * Hi vedathemes,
 * Thanks for your detailed instruction. I don’t know if it really works or not,’
   cause I’ve already added the code then test on 2 devices, one is worked while
   other isn’t. I will test again on tmr but it seems it’ll be fine :D.
 * Thanks for your quick respond and wish you a nice weekend.
    Regards,

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

The topic ‘Block Ads position’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/bayleaf/1.4.9/screenshot.png)
 * Bayleaf
 * [Support Threads](https://wordpress.org/support/theme/bayleaf/)
 * [Active Topics](https://wordpress.org/support/theme/bayleaf/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/bayleaf/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/bayleaf/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [hathuan12](https://wordpress.org/support/users/hathuan12/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/block-ads-position/#post-12587834)
 * Status: resolved