Domain Manage

Adding Adsense to Wordpress

Discussion in 'New Domainers' started by Nova, Jul 25, 2012.

Thread Status:
Not open for further replies.
  1. Nova United Kingdom

    Nova Active Member

    Joined:
    Mar 2012
    Posts:
    307
    Likes Received:
    2
    I've watch some videos' on YouTube about plugings that do this, however after reading reviews and some small print, one of the plugings I almost actually used, uses their adsence account number on some of the ads on your site to generate them money!

    Just wondering what pluging if any you guys use? or is it a case of adding the adsence html directly into some css files?

    What I am after is some 740x15 (3-4 word) ads directly ontop of my banner, and a banner add or Leaderboard add in the content.

    Cheers,
    Nova
     
  2. Domain Forum

    Acorn Domains Elite Member

    Joined:
    1999
    Messages:
    Many
    Likes Received:
    Lots
     
  3. Jamie101 United States

    Jamie101 Well-Known Member

    Joined:
    Jan 2012
    Posts:
    1,057
    Likes Received:
    15
    Using a plugin that puts their own code in now and again would be a crazy thing to do.

    All I do usually is:

    Have an ad in the sidebar (widget, just copy and paste the code into it)

    Then when you're posting an article or whatever, put a banner in the middle of the content / underneath the title.

    I think that works best. I think you'll need to mess around with header.php or something like that to do what you're talking about for an ad above the banner. For the content just copy and paste it in as normal.
     
  4. djbw United Kingdom

    djbw Active Member

    Joined:
    Oct 2010
    Posts:
    163
    Likes Received:
    4
    I used to just put the code in but I found that to be a bit of a nuisance after a while. I tried Ad Injection after seeing someone recommend it on here or A4U and I must say I was pretty ecstatic with the results! Considerable increase in CTR, though if you know what you are doing in the first place I'm sure you could get the same results.
     
  5. Nova United Kingdom

    Nova Active Member

    Joined:
    Mar 2012
    Posts:
    307
    Likes Received:
    2
    Agreed but after reading about a couple of these types of plugins, this practice does go on. In fact not all developers are good Samaritans giving free plugins, some have hidden catches.

    Thanks for the suggestions. I'll take a look but if anyone else has any suggestions fire away!

    Cheers,
    Nova
     
  6. Blossom

    Blossom Well-Known Member

    Joined:
    Oct 2010
    Posts:
    1,395
    Likes Received:
    55
    I use Easy Adsense, does that do that?!

    If it doesn't I'd recommend it, it's very easy to use and has a good number of options.
     
  7. Jamie101 United States

    Jamie101 Well-Known Member

    Joined:
    Jan 2012
    Posts:
    1,057
    Likes Received:
    15
  8. pbryd United Kingdom

    pbryd Active Member

    Joined:
    Mar 2007
    Posts:
    396
    Likes Received:
    2
  9. Aegean

    Aegean Active Member

    Joined:
    Feb 2011
    Posts:
    752
    Likes Received:
    16
    Why dont you just hard code your adsense into the template where you want your ads to appear? Its an option to using a plugin (which I wouldn't use) as generally theres no free lunch.
     
  10. fish United Kingdom

    fish Well-Known Member

    Joined:
    Nov 2006
    Posts:
    2,725
    Likes Received:
    27
    Correct me if I'm wrong :eek: but are not the plugins that are in the WP repository checked to be free from spurious code?
     
  11. tifosi United Kingdom

    tifosi Well-Known Member

    Joined:
    Oct 2004
    Posts:
    3,128
    Likes Received:
    45
    I've done it for a site under development by creating a number of additional widgetised sidebars and then hardcoded the sidebar functionality into the home.php file for the theme (a genesis theme in this case).

    Then in the widget admin dragging a text widget into the new sidebar with the adsense code wrapped in the script tag.

    Works fine.

    For adsense in posts you could do as pbryd mentioned. An alternative if you want control over placement is via a shortcode:
    Code:
    function my_adsense() {    
        return '<div id="adsenseads">Your Google Adsense code here</div>';
    }
    add_shortcode('myads', 'my_adsense');
    
    Then use [myads] in the post/themeloop. Thats a simple example, more complex ones to filter the adsense type, skin or position can be added via shortcode arguments.
     
    Last edited: Jul 26, 2012
  12. peter_w United Kingdom

    peter_w Active Member

    Joined:
    Nov 2008
    Posts:
    558
    Likes Received:
    18
    +1 for this. The less plugins the better. Something like an adsense banner should nearly always be hard-coded really, I can't think of any scenario's you'd want to use a plugin to be honest.
     
  13. admin Spain

    admin Administrator Staff Member

    Joined:
    Jun 2004
    Posts:
    10,084
    Likes Received:
    115
    That's what I do, it's a simple copy paste once you decide where yu want it to appear.

    Once you have a theme with it in, save the theme folder to your PC and FTP it back when you create a new site. You still might want to update the code through for tracking.

    Admin
     
    • Like Like x 1
  14. Blossom

    Blossom Well-Known Member

    Joined:
    Oct 2010
    Posts:
    1,395
    Likes Received:
    55
    I kind of like the plugin I use because it's more flexible in the ads appearing in different places, so decreases ad-blindness without me having to edit all the templates for all the different sites every so often. Also, it stops too many ads appearing on the homepage (since some of the posts are full length/long snippets, ads will show for those). Easy Adsense prevents ads appearing where it would violate guidelines without me having to mess with unusual bits of code to make specific homepage restrictions.

    ...having it checked for dodgy code now though, will let you know the outcome!
     
  15. Jamie101 United States

    Jamie101 Well-Known Member

    Joined:
    Jan 2012
    Posts:
    1,057
    Likes Received:
    15
    About too many ads appearing, I'm pretty sure Adsense don't let you do that?

    I know on one of my sites that has snippets of articles (and I have Adsense before the content of the article starts) it only shows the first 3 ads and then doesn't show any more for the rest of them.

    Maybe I'm wrong though, saw a site yesterday that had around 7 normal ad units, don't know how that works.
     
  16. Blossom

    Blossom Well-Known Member

    Joined:
    Oct 2010
    Posts:
    1,395
    Likes Received:
    55
    Ooh I don't know, maybe I'm being conned into thinking it's an Easy Adsense feature then.
     
  17. Jamie101 United States

    Jamie101 Well-Known Member

    Joined:
    Jan 2012
    Posts:
    1,057
    Likes Received:
    15
    Sounds like it alright. 99% sure Adsense doesn't allow you to have too many ads on one page :)
     
  18. GeekSlash

    GeekSlash Member

    Joined:
    Mar 2008
    Posts:
    41
    Likes Received:
    1
    I typically use Ad Injection plugin or if I'm using the genesis framework I use the simple hooks plugin that comes with it to insert above and below posts or in headers etc. Ad Injection is good for in-content ads as you can set it to only trigger them if the page is over a certain number of words so you don't end up with the sort of ad-heavy pages that really annoy users.
     
  19. scrizzle

    scrizzle Active Member

    Joined:
    Nov 2008
    Posts:
    57
    Likes Received:
    1
  20. Adem United Kingdom

    Adem Active Member

    Joined:
    Mar 2012
    Posts:
    140
    Likes Received:
    2
    I use Quick AdSense which allows you to insert your Adsense codes into the settings menu and then specify where you want them to appear on pages and posts and so it's easy to change the position, eg. align left, align right, appear after first paragraph etc.

    And no dodgy code either.
     
Thread Status:
Not open for further replies.

Share This Page