Title: Restriction to ad code format?
Last modified: August 31, 2016

---

# Restriction to ad code format?

 *  [Cristescu Bogdan](https://wordpress.org/support/users/cbogdan/)
 * (@cbogdan)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/restriction-to-ad-code-format/)
 * Let me firt explain my situation. I use optimized ads from google adsense. I 
   get this code from them, like a solution, how to control the size of your ads
   in a responsive style. So my code is:
 * `<ins class="adsbygoogle" ...`
 * Instad of this i put
 * `<ins class="adsbygoogle ads-text-post-2" ...`
 * Where ads-text-post-2 is a uniq class for the ad block. So for this class I have
   this shot css inline:
 *     ```
       <style>
       .ads-text-post-2 { width: 336px; height: 280px; }
       @media(min-width: 320px) { .ads-text-post-2 { width: 320px; height: 100px; } }
       @media(min-width: 480px) { .ads-text-post-2 { width: 320px; height: 100px; } }
       @media(min-width: 768px) { .ads-text-post-2 { width: 300px; height: 250px; } }
       @media(min-width: 986px) { .ads-text-post-2 { width: 336px; height: 280px; } }
       </style>
       <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
       <ins class="adsbygoogle ads-text-post-2" ...
       ```
   
 * My problem is: If I use the adsense code without inline css code, the plugin 
   record my ad code when I save the setting, but if I insert also inline css code
   with the adsense ad code, the plugin dont save the setting. Practicaly the field
   where I insert the code remain empty!
 * What to do? Thx!
 * [https://wordpress.org/plugins/quick-adsense-reloaded/](https://wordpress.org/plugins/quick-adsense-reloaded/)

Viewing 1 replies (of 1 total)

 *  [Rene Hermenau](https://wordpress.org/support/users/renehermi/)
 * (@renehermi)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/restriction-to-ad-code-format/#post-6970255)
 * There is no restriction. You can use any code in the adsense fields. I checked
   your code and paste it into the ads window in my development site and its stored
   as expected.
 * Please install query monitor plugin and check if your site is throwing more errors:
   
   [https://wordpress.org/plugins/query-monitor/](https://wordpress.org/plugins/query-monitor/)
 * Also enable debug mode:
    [https://codex.wordpress.org/Debugging_in_WordPress](https://codex.wordpress.org/Debugging_in_WordPress)

Viewing 1 replies (of 1 total)

The topic ‘Restriction to ad code format?’ is closed to new replies.

 * ![](https://ps.w.org/quick-adsense-reloaded/assets/icon-256x256.png?rev=2369641)
 * [Quads Ads Manager for Google AdSense](https://wordpress.org/plugins/quick-adsense-reloaded/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/quick-adsense-reloaded/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/quick-adsense-reloaded/)
 * [Active Topics](https://wordpress.org/support/plugin/quick-adsense-reloaded/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/quick-adsense-reloaded/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/quick-adsense-reloaded/reviews/)

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)

 * 1 reply
 * 2 participants
 * Last reply from: [Rene Hermenau](https://wordpress.org/support/users/renehermi/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/restriction-to-ad-code-format/#post-6970255)
 * Status: not resolved