• Resolved storstadnyk

    (@storstadnyk)


    Ok, so i’ve really tried to find a solution for this on the web and on the forum but nothing works. I’m doing something wrong.

    I want to ad a adsense code to all “single post pages”, not the first page with the list of resent post, but right under the full article just before the comment-section.

    I’ve tried the single.php page. it looks like this:

    <?php
    /*
    	This theme is Copyright (C) 2008-2010 Andrew Powers, PageLines.com (andrew AT pagelines DOT com)
    */
    
    setup_pagelines_template();

    I’ve tried the template.postloop.php page. lots of code but no matter where i put the adsense-code it doesn’t show anywhere on the website.

    I don’t know what else to do. I don’t want to use a plugin because it really slows down my loading-time more and more or every plugin.

    Please, can someone explain this to me?
    My webpage is http://www.storstadnykoping.se, U can also contact me directly on kontakt (a) storstadnykoping.se

Viewing 4 replies - 1 through 4 (of 4 total)
  • template.postloop.php (it’s in the base theme directory). I’m fairly certain you’ll have to do a conditional (is_single) for the adsense code.

    Thread Starter storstadnyk

    (@storstadnyk)

    Ok i have no idea of what an (is_single) is :S I know nothing about php.

    But this is all the code from the template.postloop.php: as u can see. i added the google adsense code to the botton of the code. just before the ending. But all that did was to add it to the pages, not the posts. Which is the opposite of what i want to do. can u please ad/change the code and post it so that i can overwrite everything with the new code? Id would be really nice of you! I’m lost in this.

    [code moderated as per forum rules - please use the pastebin]

    Conditional tags. Or, email me the following items:

    template.postloop.php (from your theme)
    a txt file with your adsense code
    a second txt file explaining WHERE exactly you want that code (before content, after, etc.)

    I’ll throw it all together for you and send it back. (boyevul@gmail.com)

    Thread Starter storstadnyk

    (@storstadnyk)

    Thank you boyevul! Your help did exaclty what i wanted 🙂

    The whole organization Storstad Nyköping thanks you!

    best regards, Patrik

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘adsense to single post, where goes the code?’ is closed to new replies.