• phaze112

    (@phaze112)


    Does anyone know how to add adsense ads inside an actual post, not before it or after it, but i mean like a block inside a post. thanks.

Viewing 11 replies - 1 through 11 (of 11 total)
  • trustme

    (@trustme)

    check out the adsense delux plugin.
    it will do it for you.

    Rok

    (@rok)

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Generally speaking, it’s a bad idea to insert actual adsense code into your actual post.

    If you want adsense code to be displayed inside a post, you really should use a plugin for the purpose. Or modify your template.

    Thread Starter phaze112

    (@phaze112)

    Yes, exactly. I want to modify my template, not spend time inserting code for each post.

    He talks about ways to insert this line of code:
    <?php adsense_deluxe_ads(‘ad_block_name’); ?>
    into your template so that you do not have to modify each post so that it incluldes adsense.

    However, I am not sure where to add that line of code.

    I am trying to accomplish this:
    http://www.johnchow.com/

    *when I use this plug in and put the code in the actual post, it does not show up like that as the adsense block takes up its own lines and no text is on those lines.

    Thread Starter phaze112

    (@phaze112)

    well i figured out how to do it manually into each post by just adding <div style=”margin: 3px; float: right;”> before the adsense code and of course </div> after.

    I just really knew I wish a way to get my template to do this for each post

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    How about editing the template and putting that code into there? Not that difficult, really.

    Thread Starter phaze112

    (@phaze112)

    what?

    Put it into which part of the template? I have no idea what you are talking about…

    The template I am using has about 10 theme files and I do not which one to change.

    I have been at this for 4 hours, it seems pretty difficult.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    What file you edit depends on where you want the adsense block to appear. You have not told us where you want it to be. “In a post” is not an answer. In a post on the main page? Single post pages? Category pages? Archive pages? Do want it to show on all the posts? Just the top post? Just the last post?

    There’s a lot of possible places to put it. Where do you want it to be? Be specific.

    Reading this might help you understand what all those pages in your theme are for:
    http://codex.wordpress.org/Using_Themes#Theme_Files

    Also, read this to understand how some of them are used:
    http://codex.wordpress.org/Template_Hierarchy

    Thread Starter phaze112

    (@phaze112)

    I am trying to get it just like this:
    http://www.totalcomputerrepair.com/

    But I did that by putting the code in on that single post, any idea which theme file generally would handle such things?

    I have been looking at those links and am understanding how they all are relating to the physical appearance, so thank you alot.

    Thread Starter phaze112

    (@phaze112)

    I’d like it just on my first post on the root page.

    Any idea if this is even possible at all?

    Or because this is done inside the post,,,, it has be done each and everytime ?

    davidchait

    (@davidchait)

    If you want it physically inside the post, you need to either:

    – use a plugin with a custom tag (I assume one has an <adsense/> tag…) to embed where you want it in the posts. That way, it gets inserted for you ‘on demand’. You just add a tag.
    – embed it physically in the posts you care about
    – embed in your template, and use CSS to ‘float’ it into the right location (I’d have to think about this, since the text flows around it…).

    -d

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Adding Adsense inside a post’ is closed to new replies.