Remove Adsense From Certain Pages and Post in Thesis

By on December 26, 2011

Thesis Theme for WordPress:  Options Galore and a Helpful Support CommunityWhen adding Google Adsense to your WordPress website it is very handy to be able to choose which pages and posts AdSense appears on, therefore you might need to remove Adsense from the ones you want. This tutorial is targeting the Thesis WordPress theme as this is one of the most versatile premium themes I have. I actually bought Thesis for this exact reason.

Firstly, I need to explain why I would want to remove AdSense from a particular post or page.

I am a huge Adsesne fan and it is a great way to make money online. But it is not a good idea to have all your eggs in one basket, we have all heard this before. A few years ago, I really only used AdSense ads to make money online and I knew this was a bad idea. Therefore in the past few years I have been diversifying my moneymaking methods. Earlier I wrote an article about how I make money online and even though I missed out on half my moneymaking ways, you can get the picture that it is now a total mix of methods.

When it comes to Google AdSense ads, this is still the backbone of my business, but other moneymaking ways are approaching fast. There are so many ways to make money online so you need to make choices. I have found existing webpages, added affiliate banners and links to test to see if I could make more money out of existing pages. Of course this does not work every page and post and therefore I keep AdSense showing on some of them. This is why I need to choose which pages and posts AdSense appears on in Thesis. Some pages and posts have double the income by removing AdSense and placing the appropriate product to sell. Like I said this does not work for every page or post, so AdSense has now become the backup moneymaker, if the other tests do not work out.

Remove Adsense From Certain Pages and Post in Thesis

Here is the original code that I placed into my custom functions.php file. This is exactly what I had to add a AdSense ads to every post on my Thesis blog. I used CSS to position the ad.

function single_post_ad_300() {
if (is_single()) { ?>
<div>
My Adsense Code Here
</div>
<?php
}
add_action('thesis_hook_before_post', 'single_post_ad_300');

But I needed to remove Google Adsense ads from certain pages so I changed one line:

if (is_single()) { ?>

to

if (!is_page() && !is_single( array( 13406,5526,1025,14717,795,991,649, ) )) {  ?>

The numbers I have placed in there are post numbers. All you have to do is find the post number and add it in.

Watch this video showing how to find the post ID (number)

Add Adsense to a particular page

In this example I am adding ads to only certain pages. This way is hard work and I would much rather not list all the single posts to add Adsense to. However i have used this code for adding things like Facebook comments to certain pages and posts only.

if (is_single('470') || is_single('415') || is_single('418') || is_single('441')) { ?>

Another way is to use array:

if  (is_single( array( 484,526,2699, ) )) { ?>

Remove Adsense From Certain Pages and Post in Thesis

Now some people may say this is a waste of time but I have an example for you to show that it is not. The funny thing is, I asked a WordPress Theme guru how to do this with his theme and he basically told me it was a waste of time and didn’t give me an answer. Now I do not recommend his themes because I thought he was totally close minded.

Anyway I will stop blabbing and show you the proof. This screenshot below is from a product I am selling. I had to remove the Adsense Ads from 4 posts to get this income.

Remove Adsense

Unfortunately I cannot tell you the pages I am talking about as they are highly competitive pages but this is how you keep moving forward. Adsense was clearly giving me the clue telling me the pages were valuable. I just took that information and used it to my advantage.

Therefore I turned approx $400 a month from Adsense into $1000 a month and climbing! Now that is why I do this and that is why it is sometimes a smart move. Yes I had earnings from these 4 posts but now I have optimized my earnings without increasing traffic or adding new content.

 

About mitz

My name is Milica Pantic but everyone calls me Mitz. I am addicted to internet marketing and making money online. Who wouldn't want to live that life? I started out with one website as a hobby and now have over 20. Building websites and making money online is not that hard. You have to actually take action to make money...that is the biggest hurdle! :)

38 Comments

  1. julia

    February 3, 2012 at 6:40 pm

    Most of the people probably heard a lot about Google AdSense. No doubt it is one of the hottest ways to make money online. But it is not an easy task to make money with adsense. It required a lot of traffic away on site. With the plenty of traffic we also need website promotion techniques like SEO and especially content that will attract the ads with the highest (PPC) rate. This complete process takes a lot of time. Thanks for sharing your great idea. I personally like “Sponsorship advertising” to make money online.
    julia recently posted..Fortuna Callus Shaver

  2. deep

    January 31, 2012 at 7:20 am

    Thanks Mitz, I will definitely follow your advice and place only limited ads on my posts lets hope this will increase my earnings.
    deep recently posted..Protecting Children On The Internet With .kid Domain

  3. devesh

    January 31, 2012 at 7:17 am

    Hey Mitz thanks for the article it is really important to place correct and targeted ads on your post and not make it look totally spam.
    devesh recently posted..How To Go To An Interview Tips

  4. Simon

    January 17, 2012 at 11:39 am

    Great advice, I didn’t realize the impact that could come from removing AdSense from certain pages so that visitors are not distracted from other more targeted ads on that site. It just goes to show how too many adds can be a bad thing.
    Simon recently posted..Ancient Greek Coins

    • mitz

      January 17, 2012 at 3:19 pm

      Yes it is very important not to have too many goals on the same page as people get confused! :)

  5. Frank Bowes

    January 7, 2012 at 8:41 am

    Hi mitz, your last Adsense article was a great help in increasing my Adsense revenue so I’ll definitely give this a go. Thanks again for sharing your insights, they make all the difference to new bloggers like me.
    Frank Bowes recently posted..Write Content and Get Paid with Elance

  6. Chris

    January 7, 2012 at 7:21 am

    Although my website gets a good amount of hits per day, I have never attempted to incorporate Adsense. I just feel like I need to keep them on my site and not send them off to someone else’s even if I do make money by them doing so.
    Chris recently posted..Austin Homes For Sale: Find Austin Real Estate

  7. Manuel Marino

    January 5, 2012 at 11:14 am

    about ads and blog design, I’m made a restyle of my blog, if you want to check it.

    ads should be placed in a way that does not annoy the reader, or they could be very informative and add value to the website, as example including interesting books that can be of help to your specific audience (mine is mainly musicians, composers, artists, freelance).
    Manuel Marino recently posted..Learn How to Sing

  8. manojtwa

    January 4, 2012 at 10:49 pm

    Exciting publish. Individually I’m not a fan for AdSense and do not have them on my websites at all. There are two factors for that. First of all, in my market analysis, I check out several websites every day. Some with AdSense are okay (ie: ads are not too intrusive) but on others those textual content ads damage what could have been a reader-friendly website.

  9. jan

    January 3, 2012 at 7:15 pm

    Thanks for another informative post – I never thought about checking the Google Ads to find suitable products to promote – very clever, I will keep an eye out on my sites to see what Google is advertising!
    jan recently posted..FAQ about the Weight Watchers PointsPlus program

  10. Jon

    January 3, 2012 at 4:44 am

    Interesting post. Personally I’m not a fan for AdSense and don’t have them on my sites at all. There are two reasons for that. Firstly, in my niche research, I visit numerous sites every day. Some with AdSense are okay (ie: ads aren’t too intrusive) but on others those text ads ruin what could have been a reader-friendly page.

    My second reason relates to Google. If I try to sign up for AdSense they tell me I already have an account but when I try to login they tell me I haven’t. I had some fruitless discussions about that in their forum that took me nowhere fast so I just flagged the idea completely.
    Jon recently posted..Discreet Shopping Online

    • mitz

      January 3, 2012 at 8:41 am

      Instead of trying to signing up to Adsense, why not try loggin in then. Oh no, maybe someone has signed up using your name?

      I know people do overload their sites with ads but this does not mean you have to do this! There are many great opportunities out there, but if you are successful with what you are doing then you probably don’t need to stress yourself about Adsense.

      • Jon

        January 3, 2012 at 9:58 am

        Thanks for taking the time to respond Mitz. I wouldn’t mind having Adsense (sp) in moderation on some sites but since I can’t have them I’ve just taken it as a sign from the Affiliate Gods that I don’t need them:) While on that topic there seem to be two schools of thought on banners. Some swear by them but others suggest text links in posts get better results. Have you done any tests to see which work best?
        Jon recently posted..Broken Promises and New Year’s Resolutions

        • mitz

          January 3, 2012 at 10:43 am

          Definitely text links work better on some sites with fantastic content, however I have made loads of money off AdSense and still do and all of their advertising is usually a banner or text ads. What you need to do is test both and then see what works for your website. This is why I have written this post showing how to remove AdSense from certain pages only. As you can see if you read the article, there is a very good reason for this. On the other hand would not want to remove AdSense altogether as it is making me money on the pages that I have not got time to optimize and monetize.

  11. Juphet Mislang

    January 2, 2012 at 3:10 pm

    Nice idea of combining thesis themes and adsense. Thanks Mitz for the share. Somehow, an interesting stuff to try, considering the increase of your profit.
    Juphet Mislang recently posted..Six-Point Priority Site Audit For Large Websites on a Post Panda Update

  12. Amanda Gordon

    December 30, 2011 at 10:30 am

    Ha … and I thought I was the only one to run into a scenario of a post based adsense control! This is precisely what I did for some of my posts.

    In some of my blogs I use pages a lot. The privacy policy page should not contain adsense so I had to get dirty with code to remove adsense on specific posts and pages.
    Amanda Gordon recently posted..Hand Held Vacuum Cleaners

  13. Danny

    December 30, 2011 at 11:52 am

    I am not that big into adsense but these are some great tips to follow. I love using the thesis theme as it is very seo and user friendly.
    Danny recently posted..Oak Creek Riverview Homes For Rent

  14. Manuel Marino

    December 30, 2011 at 10:36 am

    in theory there’s also another method, to create specific templates where adsense is not present, or viceversa. Maybe it’s easier than struggling with the php codes.
    Manuel Marino recently posted..Internet Internet marketing Business enterprise Strategy

  15. Katie Woodard

    December 30, 2011 at 4:30 am

    I use AdSense on all of my pages, but I don’t make much money off of it. I think I will delete it from some pages and put up other ads if I can find other profitable ads to use.
    Katie Woodard recently posted..Tyrese- Fireworkz Remix feat. T.I., Big Sean, and Busta Rhymes – Download

  16. Manuel Marino

    December 30, 2011 at 12:34 am

    I’ve used a special php loop so I can have advertisement appearing a number of times only in my pages. As you know, adsense shows blank spaces if you place more than 3 ad boxes, and this solves the problem.

    Let me know if you need help to create something similar.
    Manuel Marino recently posted..Book Review for: “Through A Viking Mist”

  17. Sheena

    December 29, 2011 at 2:39 pm

    Hi, Mitz! I hope you had a great Christmas :) You are right; Google Adsense has been very helpful to bloggers but we should always look for other means to earn money online. Thanks for suggesting that we should diversify the ads in the pages of our website and never rely on Adsense alone. We can always seek for other money-making partnerships and networks. The online world is so huge and thousands of earning opportunities await. I just love the online world! It has helped me earn more for my family.

  18. Rick Castro

    December 28, 2011 at 10:47 am

    Wow.. The increase is surprisingly high. Thanks Mitz for the video and for the codes. This is a very good idea in order to increase profit.Thanks again, I really appreciated it.

  19. Kenneth Thomas

    December 28, 2011 at 10:08 am

    Thanks for sharing the great information..
    I will use that trick…
    Kenneth Thomas recently posted..BlackBerry Curve 8320 Titanium (Quadband Unlocked) Cell Phone

  20. Albert

    December 28, 2011 at 9:46 am

    A great tips and tutorial Mitz.
    Unfortunately, I don’t have a Thesis Theme yet

    ps: on third paragraph you have misspelled ADSENSE
    Albert recently posted..Al-Waleed tweets in Arabic with 300 million

    • mitz

      December 29, 2011 at 9:03 am

      Oh no..How could I misspell that great word! Thanks Albert. I would never have noticed because my spell checker doesn’t even like the word Adsense even when I do spell it correctly. :) That was just a test to see if anyone was reading the article or not! You passed!

  21. Mark Tesa

    December 28, 2011 at 4:46 am

    It is wise to know what works and what does not work in terms of making money online. I agree that on some pages you have to look for other means of making money apart from Adsense and knowing this can really help you to maximize on your profits.

    • Moli

      December 29, 2011 at 7:19 pm

      I tried understanding whats the point of Thesis, could you make a post regarding “what the **** is Thesis”, what is so wrong with WordPress, i cant understand.
      Moli recently posted..פתרונות אינטרנט לעסקים

      • mitz

        December 30, 2011 at 8:36 am

        Ok sure. There is nothing wrong with WordPress as you need this frost to use Thesis. Thesis is a theme framework. I will be writing more on Thesis soon. :)

  22. Matt Kinsella

    December 28, 2011 at 3:58 am

    I think this is more important than a lot of bloggers realize, pages plastered with ads can be distracting and take readers attention from the real content. Being careful with ad placement of each page and giving it different consideration on each page is often really appreciated by visitors.
    Matt Kinsella recently posted..How To Be Lucky In Life

  23. Allen

    December 28, 2011 at 3:56 am

    Another reason why you sometimes don’t want Adsense to show, is that sometimes content you post might not be allowed by Google, even though you would think your content is quite innocent. I don’t want to take any chances to getting my account banned, so I make sure Adsense is only shown on the appropriate pages.
    Allen recently posted..Great Gmail Backup Software

    • Albert

      December 28, 2011 at 9:51 am

      I agree with you Allen…Sometimes you build pages that are useful for you but can compromise your Adsense account.

      If Big G bans you,there aren’t chance to come back!
      Albert recently posted..Al-Waleed tweets in Arabic with 300 million

  24. Liane Markus

    December 27, 2011 at 11:53 pm

    I know this needs enough time and effort and thesis is actually one of the hardest part when it come to adsense. Thanks a lot for providing this because this is another knowledge for us and this will serve as a guide and reminder to each and everyone who is having problem with removing adsense.
    Liane Markus recently posted..SMS

  25. Brenda Macalino

    December 27, 2011 at 11:41 pm

    This is great Nice to see this in here, that one is not really easy to do it but I have no to say you have a good idea..
    Brenda Macalino recently posted..SMS

  26. Toby Hanks

    December 27, 2011 at 10:35 pm

    Thank you man. I was trying to do this for months.This will definitley increase my profit.
    Toby Hanks recently posted..Smješni video klipovi

  27. julie

    December 27, 2011 at 1:31 am

    wow! well done you, turning $400 a month from Adsense into $1000 a month and climbing is awesome, im really impressed

  28. Raj

    December 27, 2011 at 12:53 am

    Is there a way to display ads only for posts in a certain category (and track them/ reports)? That could be useful because many people have multi niche blogs…
    Raj recently posted..Everything counts! – Using Every Available Resource to Get More Traffic.

    • Eugene

      December 27, 2011 at 6:21 pm

      Good idea. Actually, it might be really practical to have ads only for certain categories.
      Mitz, thanx for sharing the code. I think I’ll need to modify it a bit for my blog but the essence is yours. Thanx again!

      • mitz

        December 27, 2011 at 9:05 pm

        I haven’t had the need to control Ads on the categories as I only concentrate on conversions for individual pages. Once I have done this I move onto another page. Stopping Ads on Categories would not have helped me in this situation as there are 100+ posts in the same category and I only wanted to remove Adsense on 4 pages.

        As for tracking I do use URL channels in Adsense and ad channels.
        mitz recently posted..Successful WordPress Website Checklist (dofollow)

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

COMMENTING POLICY: We love comments here but we have rules. Please do not use keywords in "Name" field; you MUST leave a real name in order to get your comment approved. Spamming for a link will not be tolerated on this site so do not waste your time.