1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to insert adsense code?

Discussion in 'Blogging' started by myloveistwitter, Sep 28, 2010.

  1. myloveistwitter

    myloveistwitter Junior Member

    Joined:
    Jun 17, 2009
    Messages:
    150
    Likes Received:
    74
  2. Stzzzz

    Stzzzz Junior Member

    Joined:
    Oct 2, 2009
    Messages:
    138
    Likes Received:
    9
  3. peter73

    peter73 Regular Member

    Joined:
    Jun 27, 2010
    Messages:
    341
    Likes Received:
    90
    Location:
    X marks the spot----------------------------X
    Go to Post settings and you should see the option there
     
  4. myloveistwitter

    myloveistwitter Junior Member

    Joined:
    Jun 17, 2009
    Messages:
    150
    Likes Received:
    74
  5. showboytridin

    showboytridin Regular Member

    Joined:
    Sep 5, 2009
    Messages:
    348
    Likes Received:
    714
    Location:
    127.0.0.1
    If you are trying to paste adsense code directly on your xml template, you will need to convert some characters like '<' or '>' to xhtml entities.

    Take a look:
    Code:
    http://www.eblogtemplates.com/how-to-embed-ad-code-anywhere-in-your-blogger-template/
    Another thing: be careful with online converters. Some of them convert with their own adsense code. Always check your pub id.
     
  6. LyNHS

    LyNHS Regular Member

    Joined:
    Jul 20, 2010
    Messages:
    282
    Likes Received:
    98
    Occupation:
    Google AdSense
    Home Page:
    In your Blogger Account, just click "Monetize", sign into your AdSense Account and it will have all the options for you. :)
     
  7. LyNHS

    LyNHS Regular Member

    Joined:
    Jul 20, 2010
    Messages:
    282
    Likes Received:
    98
    Occupation:
    Google AdSense
    Home Page:
    Sorry, I've just looked at the demo and understand what you want to achieve.

    When you're writing a post, click the HTML tab and insert the following code at the beginning of your posts text:

    Code:
    <div style="float:right;margin:3px 3px 3px 3px;">
    INSERT YOUR ADSENSE CODE IN HERE
    </div>
    Hope that helps,
    Lynn.
     
    • Thanks Thanks x 1
  8. myloveistwitter

    myloveistwitter Junior Member

    Joined:
    Jun 17, 2009
    Messages:
    150
    Likes Received:
    74
    Thanks
    how to add this code to theme?
     
  9. LyNHS

    LyNHS Regular Member

    Joined:
    Jul 20, 2010
    Messages:
    282
    Likes Received:
    98
    Occupation:
    Google AdSense
    Home Page:
    There's no need to add it to any theme - you just simply add it to your HTML of the actual post... simple:

    [​IMG]
     
    • Thanks Thanks x 1
  10. myloveistwitter

    myloveistwitter Junior Member

    Joined:
    Jun 17, 2009
    Messages:
    150
    Likes Received:
    74
    how to add this code to theme?
    For Autoblogs?
     
  11. myloveistwitter

    myloveistwitter Junior Member

    Joined:
    Jun 17, 2009
    Messages:
    150
    Likes Received:
    74
    how to add this code to theme?
    For Autoblogs?
     
  12. Millygirl

    Millygirl Regular Member

    Joined:
    Mar 15, 2009
    Messages:
    323
    Likes Received:
    207
    Occupation:
    Job? What's that?
    Location:
    Planet Earth :P
    I am no coder so if someone can say whether or not the code below is legit (or beneficial/hurtful to ones wordpress blog) I would very much appreciate it.

    I found the code over at:
    Code:
    http://www.r10.net/wordpress/612719-icerik-ortasina-reklam.html
    PHP:
    <?php
      $content 
    apply_filters('the_content'$post->post_content);  //get the post content store in $content
      
    $save explode("</p>"$content);  //Separate the content into <p> blocks
      
    $tcount=0//this is count for number of <p> blocks
      
    $adon=0;  //this is a variable so you don't show ads more than once.
      
    foreach($save as $item) {
        echo 
    $item;  //print the <p> block
        
    echo "</p>"
        if(
    preg_match('/<p> /',$item)==&& $tcount>=&& $adon==0) {
                                    
    $adon=1;
    ?>
    Replace this with Your adsense code!!!
    <?php
        
    }
     if(
    preg_match('/<p> /',$item)==&& $tcount>=&& $adon==1) {
                                    
    $adon=2;
    ?>
    Replace this with Your adsense code if you want additional adsense blocks for super long blog posts or leave it empty if you don't want one.
    <?php
       
    }
       
    $tcount++;
     }
    ?>
     
  13. myloveistwitter

    myloveistwitter Junior Member

    Joined:
    Jun 17, 2009
    Messages:
    150
    Likes Received:
    74
    Please help me
     
  14. Alexfrance

    Alexfrance Regular Member

    Joined:
    Jul 26, 2010
    Messages:
    337
    Likes Received:
    73
    Occupation:
    Intel Pentium I 75 Mhz Processor
    Location:
    Somewhere in France, 20 km from Belgium
    in a widget it's:

    1. choose 'text' widget
    2. add <body> and </body>
    3. past adsense code in between
    4. voila, you have adsense in widget!

    In your text? The same way! Add the codes in HTML-part:
    1. Choose HTML
    2. add <body> and </body>
    3. past adsense code in between
    4. voila, you have adsense in post!
     
  15. myloveistwitter

    myloveistwitter Junior Member

    Joined:
    Jun 17, 2009
    Messages:
    150
    Likes Received:
    74
  16. Millygirl

    Millygirl Regular Member

    Joined:
    Mar 15, 2009
    Messages:
    323
    Likes Received:
    207
    Occupation:
    Job? What's that?
    Location:
    Planet Earth :P
    I have not tried this myself but if you look towards the bottom of the page under the heading of Adsense Within Posts you may find your answer.

    Here is the website:

    Code:
    http://www.scratch99.com/2009/01/blogger-how-to-add-adsense-inside-single-posts-only/
     
  17. wahabbusiness

    wahabbusiness Newbie

    Joined:
    Sep 13, 2010
    Messages:
    16
    Likes Received:
    1
    i think google does not allow to show there ads between post
     
  18. ADHD-Dude

    ADHD-Dude Power Member

    Joined:
    Apr 17, 2010
    Messages:
    592
    Likes Received:
    119
    This is BHW, not noob world if you don't know how to put ads in a site go to
    PHP:
    forumsdigitalpointcom
    the land of the freaking noobs, get out of here.

    wahabbusiness and myloveistwitter use google if you want help?
     
  19. m73022

    m73022 Newbie

    Joined:
    Apr 25, 2008
    Messages:
    45
    Likes Received:
    39
    hi everyone, i am having an issue adding adsense code so it comes up right under the title of each post in my wordpress autoblog. i have seen how to do this in the editor for the signle.php file but since this is an autoblog, i am trying to find out what page in the editor and where in the code to post my adsense. any help would be awesome. thanks. in advance.