techposts jetpack adsense insert mobile theme -Techposts


How to Add Google Adsense to WP JetPack Mobile Theme – WordPress Tutorial

Jetpack is a free wordpress plugin that adds a lot of useful features in the self hosted blogs of wordpress. Jetpack team has added numerous attributes into it and so now it has become one of the must have plugins of wordpress blog. You must have installed a responsive theme to your blog but the problem with there mobile view is the pagespeed and loading time it takes which can also affect your search rankings. Thankfully, Jetpack has a feature called Mobile Theme. When you enable this feature you see a simple but efficient Mobile Site view which loads much faster. You can download Jetpack Plugin from this link.

Now most of the wordpress users face one problem here and that is “How to enable or add google adsense in Jetpack mobile theme.” Well, we have better solution. We’ll be discussing a simple tweak here for adding adsense ad code by editing Jetpack mobile theme.

Adding Adsense Ad Code to Jetpack Mobile Theme :

Things you will need prior to starting :

  •  Access to your site via FTP. You can accomplish this using FileZilla on Mac, Windows or Linux.-

Before adding any ad code to your wordpress theme, Please be warned to have a backup of files. It will save you from messing your blog theme. Still if you are using it without backup, use it at your own risk.

1. You must create a new AdSense code unit that will appear correctly within the approx “300px″ width of your site. The unit size that I thought worked best was the 200×90 and 320x50. If I used the320×50 it looked great, but would stretch off the side a little too much. Below is the end result of the 200×90 size.

techposts jetpack adsense insert mobile theme -Techposts

2. Once you have your AdSense Code created.  Next step is to edit the“index.php” in Jetpack plugin.For this you need to find the file called “index.php” within the Jetpack folder on your site.

adding adsense to jetpack mobile theme
Using Cpanel

The easiest way to accomplish this is to FTP connect to your site. Using what ever FTP client (eg. Filezilla) or if you use cpanel goto filemanager and connect to your site and go to the following location:

Cpanel (Filemanager)

Don’t be afraid or Discouraged, it’s very simple and anyone with little or No knowledge of php can do this easily.

Using Filezilla FTP Client/server

3.Now once you did that and found “index.php” file, download it or if you have the ability to edit it without downloading open it for editing.

4. With “index.php” open,Look for the code

get_header(); ?>

Just below this code paste your Adsense Ad Unit Code(See Screenshot below). You can choose any other location by editing Content.php, file but I really liked the way it appeared when placed here. It will display on all pages including Homepage and Post pages or search page.

Adding Adsense Code to Minieleven (Jetpack) Theme

5.Now save the file. If using filezilla you’ll need to upload the modified “index.php” file to its same location from where you downloaded it and replace your “index.php” file inside the Jetpack directory.

Important Tip :

You can also add other Adsense ad sizes like 300 x 250 or 468 x 60 instead of 320 x 50 or 200 x 90 or any custom Ad Size. And in case if you don’t know which ad size to place, i would recommend you using Responsive Adsense Ad Code. But the problem with all these ad sizes is that they do not display properly except 320 x 50 and 200 x 90. But you can always try and find out what works best for you.

That’s all in this tutorial, if you have succesfully placed the ad code using this How to Guide, please let us know in the comments below, and for more WordPress, Android, iOS, Windows, Mac and Linux tips and tricks, Connect with us to stay updated for more by subscribing to our Newsletter or on Facebook,Google+, and Twitter.

Before You Go…

Just wanted to let you know thatWe’ve launched YouTube Channel where we upload awesome video content. Make sure you hit the subscribe button to stay up to date with the new videos we upload every week. Also Subscribe us for more How To Guides and Reviews…!!! @ for more How to Guides.

What do you think?

0 points
Upvote Downvote

Total votes: 0

Upvotes: 0

Upvotes percentage: 0.000000%

Downvotes: 0

Downvotes percentage: 0.000000%

Written by Ravi Singh

Ravi Singh 'aka' Checknmater is an Avid learner and Tech Enthusiast. He is the Founder of Techposts. Follow him on Twitter, Facebook and Google+. You can also subscribe to his YouTube channel for HowTo Video Guides and reviews.