Working From Home


How To Insert Adsense Into WordPress Post

Have you ever wanted to insert your adsense code right into your wordpress post but wasn’t sure how to do it? You’re in luck! I’m going to show you exactly how to do this. This won’t take but a second, it’s a really quick fix.

Log in to your wordpress admin.

Navigate to your theme editor. How to get there depends on the version of wordpress you are using. If you are currently up to date, it will be “Design >> Theme Editor”

Once there, click on “Single Post (single.php) on the right hand column of the editor page.

Copy and paste

<table border=”0″ width=”302″ id=”table1″ cellspacing=”3″ cellpadding=”3″ height=”252″ align=”left”>
 <tr>
  <td>
YOUR ADSENSE CODE GOES HERE
</td>
 </tr>
</table>

right above

<?php the_content(‘Read the rest of this entry &raquo;’); ?>

Your themes code may vary but it will be directly above the “the_content” call, you may have category exclusions or different text for reading the rest of the post but regardless, that’s where it goes.

Now your posts will look like…

The code above is set to use the 300×250 square adsense ad. You can use a different size ad by changing the dimensions on the table. Try and make your table bigger each direction by a couple of pixels to allow for a little spacing and so that there are no browser display problems.

You’re not limited to adsense. Post the code for any banner or text there that you like.

If you have any trouble, let me know below and I’ll try to help out.

There ya go!

Take Care,
Gail

Share

Additional Articles From "Technical"

12 Responses to “How To Cloak Affiliate Links Using Htaccess”

  1. AffiliateMusketeer on November 20th, 2008 at 4:37 am

    Thanks, Gail, great post! I got a little confused around the ‘how to count the cloaked links’ section but I think that was more due to the time (3am) than anything else. I have tried your methods again this morning though and they work perfectly.

    I’m using it on an unindexed landing page, driving traffic via PPC, and promoting a clickbank product. So far so good…

  2. Glad you were able to get it going! Your problem with understanding probably had less to do with it being 3am when you were reading and more to do with it being 3am when I wrote it. ;)

  3. Hi Gail,

    I tried your cloak link for clickbank, and it worked perfectly on the first time. the same cloak link can be used for commission junction as well?. I looked at your cloak link generator, not sure I understood it well, to give it a try.
    thanks for your help Gail.

    Warm regrds
    Charles.

  4. Hi Charles,

    Glad you were able to use the clickbank code easily. I don’t use CJ much and haven’t tried to see if I could cloak the links. For the misc items I do promote, I use my own url shrinker. You can see it at https://wahguide.com/url , you are free to use that one if you like or you can install the script and use on your own site. You can download it at https://wahguide.com/freebies/url-shortner.zip , I also put a link to it in the freebies section. It’s easy to install and the readme file is included. If you have any problems with it, just let me know. On a side note, I think it would not be difficult to do Ebay links and I’ll look at that sometime soon.

    Take care,
    Gail

  5. Hi Gail,

    Thank you so much for the reply. the url shrinker seems attractive. No Gail I did not use it yet, though just tested it. Just saw your reply, thought I will say thanks. will catch up with you once I try it out. Thanks again Gail.

    Warm Regards
    Charles.

  6. hi nice post pretty useful I got this to work, although it would be nice to know how to also include .html extension on the end instead of just http://yoursite.com/amz/B0011ZCDKS. I’m sure this can be all done in .htaccess file just not sure I’m a little bit of a green horn lol!

  7. Hi Sheldon,

    It’s no problem to add the .html to the end.

    Replace
    RewriteRule ^(.*)

    with
    RewriteRule ^(.*)\.html

    Then your link would look like
    http://yoursite.com/amz/B0011ZCDKS.html

    This works with clickbank as well. And you can change the html to any file extension you want. It is basically just ignored anyway.

  8. hi,dear

    thanks for useful tips you let me to know more about .htaccess.
    how i can indexing my newly created sites using .htaccess in search engines like google?

    thanks alot for article.

  9. Whoa… this site is pretty awesome :) your layout is really well designed, and your blogs are (judging from what i’ve read) very interesting. heehee… consider yourself favorited. :-P

  10. Hello, I enjoy reading through your blog, I wanted to leave a little comment to support you and wish you a good continuation. Wishing you the better of luck for all your blogging efforts.

  11. Flippa Chick on May 10th, 2010 at 5:36 pm

    Excellent post! I’ve switched over one of my dynamic websites to a static .html website and was looking for a more efficient way to cloak my Amazon links since I couldn’t use the features of plugins.

    Thanks for sharing! :)

  12. Amazon Links idea great. I’m going to try it with my Amazon affiliate sites. thank you.

Leave a Reply


free forex trading course