Q/A : How To Put Adsense Ads Between Post Content And Related Posts List

Recently our reader Abhi asked a question as a comment on how to put Google Adsense ads between posts contents and related posts list. I thought to share that tips on our Q/A posts. Below is the detailed scenario,

 

In my blog, I am unable to place ad between the post content and the related article list. I am using the plugin for related article. I am using WordPress Related Posts plugin. What to do?

- Abhi

Scenario: Abhi is having WordPress Related Posts Plugin installed on his wordpress and that’s why he is getting related posts list at the end of the each post content. Now he wants to insert an ad in between the post content and the related post list so that he can monetize that part pretty well. Since WordPress Related Post plugin is inserting the related posts automatically at the end of the post content and that’s why he is not able to insert ads. Now here is the solutions,

Solution: WordPress Related Posts Plugin is having an option to disable the automatic insertion of related posts list at the end of the post content. To do that, Go to the plugin setting page, and uncheck the box named as “Auto Insert Related Posts”. Since you have disabled the auto insertion, Related posts should not be appearing on the posts.

wp_related_posts

To insert the Related Posts manually, you will have to paste the below mentioned piece of code at the location mentioned below:

Go to Appearance / Editor on your dashboard, and open Single.php on edit window. Find the piece of code as :

<?php the_content; ?>

Now you can insert the below mentioned code after the content code (as above);

<?php wp_related_posts(); ?>

Now you have placed the code for related posts which is nothing but the related posts appearing because of WordPress related Posts plugin.

Since your Single.php is having both the codes now, you can insert the Google Adsense codes in between the both codes i.e. Content Code and Related Posts code. I always prefer to manually insert the codes, as you get so much of freedom to do the things your way.

Thanks Abhi for this query on Internet Techies, I will encourage all of our visitors to ask WordPress or other blogging related problems or any Software issue on Internet Techies Comments section. We will to answer you on ASAP and If we found that useful for other and that question will be featured on Q/A series on our blog.

Sanjeev Mishra is a professional blogger and an Internet Marketing Consultant based in India. He has built the Internet Techies to provide you updates in technology and web application area.

7 Comments

  1. willy

    September 15, 2009 at 10:12 pm

    nice info
    i’ve tried
    and hopely it can increase my GA

  2. abhi

    September 15, 2009 at 11:33 pm

    lol…thanks for sharing my site link. hehehe….I will write some more on it soon on my blog.

  3. Crazy blogger

    September 16, 2009 at 9:17 am

    There are many free wordpress plugins to place ads between post content and related posts list.

  4. Sanjeev Mishra

    September 16, 2009 at 11:35 am

    @Crazy blogger , Ya it is true that there are plugins to insert ads in between but one should always try to avoid extra use of plugins and should try to do that thru codes. That will not put as much load as plugins.

  5. talk2shiv

    November 5, 2009 at 5:23 pm

    Dear
    All
    Bastioncoup is looking for talented Experience who have some
    knowledge in PHP+MySQL.
    Open source work in PHP Bangalore if any body interested then forward then cv soon. Reach me at shivender.mishra@bastioncoup.com

  6. Sanjeev Mishra

    November 6, 2009 at 12:07 am

    Hi Shivendra, You may try our new Jobs Portal http://jobs.clickonf5.org/ and post your requirements over there. you will definitely get huge response in that case.

  7. talk2shiv

    January 15, 2010 at 1:35 pm

    Dear Candidate,
    This is Shiv Kumar From Bastioncoup ,
    This is to inform you that we have openings for Web designers in our company. Candidates should be having an exp level of 2 year,& mention ur Resume top 5 Web designer portfolio. if you are interested mail us

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>