Answered: SnowFlate Theme mobile sidebar problem

Post date: 2020-09-26 03:38:14
Views: 353


Google Adsense code automatically adds some malicious attributes to all DIV tags:

max-height:auto !important;  height:auto !important

This destroys the responsiveness of mobile viewing experience. I'm not using Snowflat theme, but this will surely affect every theme.

I tried several ways to overcome this, but they don't work (or no longer work). I also voiced anger on Adsense forum, and it turns out that many people out there are also pissed. So as the last resort, I had to eliminate Google Adsense code from side panel in mobile view.

So, you can try using qa_is_mobile_probably() function to display Google Adsense ads selectively.

Another method is you can create a different mobile theme. Just clone your Snowflat theme and name it as Snowtap theme, and you use Snowtap for mobile users. In Snowtap theme, you don't include Google ads in sidepanel.

Please click Here to read the full story.
 
Other Top and Latest Questions:
The 10 best state economies in America in 2026
A toxic stew drags stocks lower as we look at what can get the AI trade back on track
Waller says Fed shouldn't 'fight the last war' on inflation but warns hikes still possible
South Carolina governor taps Lindsey Graham's sister to serve as interim senator
China exports in June jump at fastest pace since 2021 as AI boom, tariff rush lift trade
Suggestions for minimal-walking activities in Brooklyn/Queens?
Trump administration urges banks to scrutinize lending to immigrants without work authorization
CNBC's The China Connection newsletter: Betting on Shenzhen over Silicon Valley
What's a good small business website solution?
I'll get right on it...