Forum Moderators: martinibuster

Message Too Old, No Replies

Can't Get Rid of Adsense Autoads in @media print CSS

AutoAds still show on printed output

         

No5needinput

5:16 pm on Nov 20, 2019 (gmt 0)

10+ Year Member Top Contributors Of The Month



I have eliminated printing unneeded parts of my sites pages - including wrapping a noprint span class around self placed Adsense units (which now do not show on print preview) - using classes/ids display:none in @media print CSS.

However the auto-inserted "here an ad, there an ad, everywhere an ad ad," Adsense units keep showing on printed page. Anyone had this trouble, or know what class/ID to target to stop them showing when printing?

JorgeV

10:45 pm on Nov 20, 2019 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month



Hello-

Seems like one additional disadvantage of auto-ads, they are "auto", and not under your control. That being said, you might always inspect the DOM of the page, one the ads are loaded, to identify the IDs used for the slots / iframes that Adsense is injecting. But, of-course,they can always change this.

No5needinput

12:20 am on Nov 22, 2019 (gmt 0)

10+ Year Member Top Contributors Of The Month



For future reference what works - (for now) - to remove Adsense AutoAds from printing is to use "display:none" in @PRINT CSS for classes ".google-auto-placed" and ".ap_container"

tangor

1:42 am on Nov 22, 2019 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Another solution to file away as needed! Thanks!