Membership is FREE, giving all registered users unlimited access to every Acorn Domains feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

Adding Adsense to Wordpress

Status
Not open for further replies.
Joined
Mar 19, 2012
Posts
306
Reaction score
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
 
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.
 
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.
 
Using a plugin that puts their own code in now and again would be a crazy thing to do.

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
 
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.
 
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.
 
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?
 
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:
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.
+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.
 
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.

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
 
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!
 
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.
 
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.

Ooh I don't know, maybe I'm being conned into thinking it's an Easy Adsense feature then.
 
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.
 
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.
 
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Premium Members

New Threads

Domain Forum Friends

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
      There are no messages in the current room.
      Top Bottom