How to add AMP to WordPress with AdSense Ads

How to add AMP to WordPress with AdSense Ads

How to add AMP to WordPress with AdSense Ads

Have you ever seen /amp on the end of the URL of a website. This refers to Accelerated Mobile Pages. AMP is meant to increase the speed of the page by customizing layout . AMP also increases your search engine ranking as search engines like pages or websites that are fast and are mobile friendly.

HOW TO ADD AMP TO WORDPRESS :

First of all download  AMP  plugin and install it. After installing it download a plugin named Glue for Yoast SEO and AMP. This plugin will enable you to customize your AMP plugin. After installing both the plugins open AMP from the Yoast SEO drop down menu. See below :

How to add AMP to WordPress with AdSense Ads

Now, click on enable AMP for posts and that’s it. You have successfully installed AMP to your WordPress site.\

CONFIGURE AMP PLUGIN :

To add more configuration to AMP plugin you need to install AMP for WP. After installing the plugin you can add a logo , advertisements, analytics etc. to your AMP pages.

HOW TO SHOW ADSENSE ADS IN AMP PAGES :

There are two methods of showing AdSense ads. The first methods is by using the same plugin  AMP for WP < Advertisement . and the second method is manual method.

For manual method follow the steps :

MANUAL METHOD :

To show AdSense ads on AMP pages click on plugins editor .

How to add AMP to WordPress with AdSense Ads

Then select AMP and open amp/templates/single.php . Now find <footer class=”amp-wp-article-footer”> and paste the following code with your AdSense publisher id and ad code.
<amp-ad
layout=”fixed-height”
height=100
type=”adsense”
data-ad-client=”ca-pub-3633908107245375
data-ad-slot=”3807225844“>
</amp-ad>
To find the ad code go to your AdSense account > My ads > Select your ad > click on get code > and find ad code there.

Save the changes and you are done . Now you can earn money from you AMP pages too.


Please share and comment . If I have missed something please tell me in comments section. Thank you.

 

 

How Much You Liked This Article

Leave a Reply

Your email address will not be published. Required fields are marked *