How to insert Adsense code right after Blog Title in Wordpress

Discussion in 'WordPress' started by Oberon, Apr 2, 2010.

  1. #1
    Hello everyone,

    I would like to insert an Adsense unit right after the Blog Title in Wordpress. I performed extensive Google searches but no luck.

    I'm sure I can do it by manually editing one of the php files, but which one, and where in the code?

    I'd be grateful if anyone can give a tip -- many thanks!
     
    Oberon, Apr 2, 2010 IP
  2. Wp-Mod.Com

    Wp-Mod.Com Peon

    Messages:
    381
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    can you give us the link to your website and tell us where you want it , may be i can help you out
     
    Wp-Mod.Com, Apr 2, 2010 IP
  3. bob25

    bob25 Well-Known Member

    Messages:
    1,519
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    128
    #3
    Might depend on the template, but here's what works for me.

    If you're using the index.php or home.php (not static homepage) place the adsense code right BEFORE:

    (have_posts()) : the_post();


    And for the posts if you have a single.php or something look for something like:

    <div class="art-PostContent">

    or

    </h2> (or <h1>)

    And try pasting it right AFTER that. You may have to experiment a bit. I usually type in some nonesense letters where I think it should go like mmmm just so it's easy to find (to replace or delete), and adjust if I need to.
     
    bob25, Apr 2, 2010 IP
  4. shivam0000

    shivam0000 Member

    Messages:
    178
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    33