There are 2 popular AMP plugins for WordPress:
- Official WordPress AMP plugin: AMP
- 3rd party AMP plugin: AMP for WP
AMP for WP should have an option for Adsense. But official one not.
I have made small inspection and noticed that all existing adsense codes are converted to amp tags – without any issues. But there is not any Ads JS file which should render these tags.
Its documentation is not good and doesn’t provide easy to fix information about this.
First i tried to add the needed JS code (for all type of ads) and tag (for auto-ads) correspondingly with wp_head and wp_footer native hookd. But no luck.
Classic mode of AMP plugin doesn’t fire any UI hook. Because it has own small template file.
So i decided to inspect the plugin’s code and to see which hooks it has for own small template.Continue reading “WordPress AMP Plugin – Use Adsense in Classic Mode”