How to Add AdSense Advertisement in the First Paragraph of the Article




Are you looking for a wordpress plugin to add your adsense or any other advertisement beside the first paragraph of your article? Well you don’t need to install any plugin to add your advertisement in the first para of your post in wordpress, It can be achieved with simple few lines of CSS and HTML coding. Here is how to show your advertisement beside the first paragraph of your wordpress article.

Adding your advertisement inside the paragraph in wordpress just takes 4 steps, with this tutorial you can either add 300 x 250 medium rectangle or 468 X 60 banner advertisement to your article without using any wordpress plugin.

Also read:

How to Add AdSense Advertisement In the First Paragraph?

Follow the steps below to display your adsense advertisement left to the first para in your article-

  1. Go to your wordpress backend, navigate to “Appearance >> Editor” and add the following CSS code to your child theme (or in custom CSS)
  2. [css] .ad-under-the-title{
    text-align: center;
    float: left;
    margin: 20px 30px 10px 0;
    }
    [/css]
  3. Now open Single Post (single.php) from the editor and find the code like <?php the_content(); ?>
  4. Add the following HTML code just before the code <?php the_content(); ?> [html] <div class=”ad-under-the-title”>
    YOUR_AD_CODE_HERE
    </div>
    [/html]

    The CSS and HTML code you have just added creates the place for your advertisement inside the first paragraph of your wordpress article. Now let’s add your advertisement code

  5. Copy your 300 x 250 medium rectangle advertisement code and replace it with YOUR_AD_CODE_HERE text in single.php

That’s it, you have added your AdSense advertisement in the first paragraph of your wordpress article. Just remove float: left; CSS code from CSS if you would like to add 468 X 60 banner advertisement before the first paragraph.



Article by Shrinivas Naik

Hi, This is Shrinivas I am a web developer and WordPress enthusiast. I am also a hobby blogger who loves to write about WordPress, web tools, blogging and technology.


One comment on “How to Add AdSense Advertisement in the First Paragraph of the Article

Leave a Reply


This function has been disabled for TechSini