Support » Fixing WordPress » How to integrate Adsense?

  • seank1


    Hi there,

    I have noticed many sites integrating google adsense boxes at the bottom of blog entries and I’d like to know how I could do this.

    I would like the adsense box to only appear at the bottom of my entries in between the entry itself and the comments box. I’m sure you guys have seen this — an example would be Notice how after you click on a blog entry, you see an advertisement space at the bottom of the post.

    Any help is appreciated.

Viewing 15 replies - 1 through 15 (of 15 total)
  • seank1

    (@seank1) is a perfect example of what I’m trying to do.



    I have integrated adsense by adding the code manually into the template as on my blog

    Made a css id for the ads and set it to display to the right.



    Thanks for the response but I’m actually asking how I can place an adsense box at the bottom of each entry. For example, at when you click on a blog entry to read the entire post, you’ll notice that there is an adsense box at the bottom of the blog entry. This is what I’m trying to replicate but can’t figure out where to place the code.



    I’d suggest using 1.5 and placing the adsense code at the bottom of the singe.php theme file



    I’m using 1.2.2. Here’s my suggestion (& it should work). Open wp-comments.php (or the comments template) and find these lines (43ish to 51ish)

    <?php } // end for each comment ?>
    </ ol>
    <?php } else { // this is displayed if there are no comments so far ?>
    <?php _e(“No comments yet.”); ?>
    <?php } ?>
    <?php comments_rss_link(__(“RSS feed for comments on this post.”)); ?>

    <!– This is where you’d want to put the add !–>

    <h2 id=”postcomment”><?php _e(“Leave a comment”); ?></h2>
    <?php if (‘open’ == $post->comment_status) { ?>
    <?php _e(“Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed:”); ?> <?php echo allowed_tags(); ?>

    etc etc …

    This way, the ad won’t be seen on the front page but will be once the user follows the link to either read more or comment.

    Hope that Helps!

    P.S. I love that I am posting under another gregor …



    perfect that is exactly what I was looking for!



    Doing that isn’t worth the time you spent asking how. It’s way below the fold. The CTR rate on blog pages is, in my experience and compared to non-blog pages, abominable and putting the ad below the fold like that can only make it worse. I had to search to even find the ads in your examples. Just put them in your main header and they’ll be at the top of every post where they might get a click.



    <i>P.S. I love that I am posting under another gregor …</i>




    I used the moosecany plugin and this sorted out all my adsense problems.

    On a related note, I have written an Adsense plugin here: Adsense inline with WordPress blog posts. This plugin could be modified to work with non-adsense stuff, but I developed it to let me click an Adsense Quicktag button to insert an Adsense ad block in the middle of a post. It’s not what was asked for here (main page adsense tricks) but when I looked for this plugin, this was the only active thread I could find.

    Anyway, I hope it helps someone.

    how about put it in the top?

    I’m on WP 1.5 and it seems like the Adsense is working but it appears like it’s not picking up the content properly to display other ads. I placed the javascript code on the bottom of the header. Take a look and refresh a few times. Also the words “ads by google” gets buried in the layout.

    Any suggestions? I’d like it to pick up more of the site’s content than just ‘guitar lessons.’

    When Google crawls your site, it uses that information to decide which ads to display on your site. After all, Adsense is content-related advertising, so there is no real way to get different ads unless you change your content.

    Yes I know that part however, how come when I mention a specific musician, there are no links appearing regarding that musician? Is there a keyword area that it crawls? Sorry if it’s such a newb question.

    Mark (podz)


    Support Maven

    I would take this over to Google Adsense help – it’s they who know how their creation works.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘How to integrate Adsense?’ is closed to new replies.