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

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

by Ravi Singh
4 comments 5 views

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 to 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 their mobile view is the page speed 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 a 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.


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.


The easiest way to accomplish this is to FTP connection to your site. Using whatever FTP client (eg. Filezilla) or if you use Cpanel goto file manager 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 successfully 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.


Rashedul Islam Arman May 21, 2015 - 4:31 am

thanks a lot for this article, and jetpack has been the most popular wordpress plugin. BUT i always prefer not to use the mobile friendly option, because i find that option weird. when i enable that feature, i see the mobile version is enabled for both desktop and mobile site. so i prefer rather then using this, use a responsive theme.

Ravi Singh May 22, 2015 - 10:36 am

Thanks for your feedback Rashedul. Yes, it does, i’ve seen this (mobile version is enabled for both desktop and mobile site) problem with other wp blogs but it’s not with my site. Earlier i was using Jetpack’s minieleven but now i’m using Wp Smart Mobile theme plugin which is working better than Minieleven. Site’s mobile pagespeed has increased because of this. BTW i’m also using responsive theme but for desktop and tablets not for low end mobile devices.

Info Viajera September 20, 2015 - 6:41 pm

Great, work’s like a charm!


Ravi Singh September 20, 2015 - 6:44 pm

Thanks!! 🙂


Leave a Reply


This site uses Akismet to reduce spam. Learn how your comment data is processed.

You may also like

TechPosts Media, A Technology Media Company - All Right Reserved. Designed and Developed by PenciDesign

Facebook Twitter Instagram Youtube Envelope

Adblock Detected

Please support us by disabling your AdBlocker extension from your browsers for our website.