Title: Device setting is not working
Last modified: November 8, 2016

---

# Device setting is not working

 *  Resolved [Arun Saini](https://wordpress.org/support/users/arunsaini1611/)
 * (@arunsaini1611)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/device-setting-is-not-working/)
 * device setting for ad blocks is not working from last one month after new version
   is updated. PC ads are showing on mobile also and mobile ads are also showing
   on pc.
    How to resolve this error my site is [http://www.wiki-how.in](http://www.wiki-how.in)
   I also enabled remote debugging.

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

 *  Plugin Author [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/device-setting-is-not-working/#post-8412061)
 * Please post screenshot of Settings/Viewports.
 *  Thread Starter [Arun Saini](https://wordpress.org/support/users/arunsaini1611/)
 * (@arunsaini1611)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/device-setting-is-not-working/#post-8413723)
 * [https://snag.gy/Yxu8th.jpg](https://snag.gy/Yxu8th.jpg)
    [https://snag.gy/CSlcIo.jpg](https://snag.gy/CSlcIo.jpg)
   Please check these screenshots.In the first one you’ll find I have selected only
   phone in device. In the second screenshot you’ll see the ad unit is also showing
   on dekstops. Please help to resolve this problem asap.
 *  Plugin Author [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/device-setting-is-not-working/#post-8415184)
 * Actually I wanted to see the screenshot of Ad Inserter Settings/Viewports (tab*,
   tab Viewports).
 * ![Viewports](https://i0.wp.com/tinymonitor.com/images/pages/ad-inserter/ad-inserter-
   settings.png)
 * It seems that your website doesn’t have CSS code for viewports.
    It should be
   iserted inline in the page HTML header.
 * Something like this:
 *     ```
       <style id='ai-frontend-inline-css' type='text/css'>
       .ai-viewport-3                { display: none !important;}
       .ai-viewport-2                { display: none !important;}
       .ai-viewport-1                { display: inherit !important;}
       .ai-viewport-0                { display: none !important;}
       @media (min-width: 768px) and (max-width: 979px) {
       .ai-viewport-1                { display: none !important;}
       .ai-viewport-2                { display: inherit !important;}
       }
       @media (max-width: 767px) {
       .ai-viewport-1                { display: none !important;}
       .ai-viewport-3                { display: inherit !important;}
       }
   
       </style>
       ```
   
 * Please post the screenshot of Viewports settings.
 *  Thread Starter [Arun Saini](https://wordpress.org/support/users/arunsaini1611/)
 * (@arunsaini1611)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/device-setting-is-not-working/#post-8419608)
 * Here is the screenshot of viewport.
    ⌊viewport screenshot⌉
 * I want to tell you this problem is occurring in all of my websites from last 
   one month. Which are using different themes and previously plugin is working 
   fine with all the sites.
 *  Plugin Author [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/device-setting-is-not-working/#post-8420973)
 * The settings seem ok.
 * Device detection doesn’t work because your website doesn’t have CSS code for 
   viewports (see above).
    Ad Inserter inserted it as inline CSS code in the page
   HTML header but something (theme/plugin) removed that code.
 * Please try to disable caching to see if the code appears.
 *  Thread Starter [Arun Saini](https://wordpress.org/support/users/arunsaini1611/)
 * (@arunsaini1611)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/device-setting-is-not-working/#post-8421763)
 * I put that above code you mention in the header and it works. But is that code
   is accurate for different screen sizes.
 *  Plugin Author [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/device-setting-is-not-working/#post-8422562)
 * Yes, the code is generted and inserted by Ad Inserter according to Viewport settings.
 * I would still try to figure out what is causing the removal of the code.

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

The topic ‘Device setting is not working’ is closed to new replies.

 * ![](https://ps.w.org/ad-inserter/assets/icon-256x256.jpg?rev=1502039)
 * [Ad Inserter - Ad Manager & AdSense Ads](https://wordpress.org/plugins/ad-inserter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ad-inserter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ad-inserter/)
 * [Active Topics](https://wordpress.org/support/plugin/ad-inserter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ad-inserter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ad-inserter/reviews/)

## Tags

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

 * 7 replies
 * 2 participants
 * Last reply from: [Spacetime](https://wordpress.org/support/users/spacetime/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/device-setting-is-not-working/#post-8422562)
 * Status: resolved