How to add adsense after first post on Homepage, Category Tag Pages
Right ads at right place ensures higher CTR thus a chance to earn more. We all take care for having the ads at its best possible location, here we will discuss more about such possible ads places and how to implement it in your wordpress blog.Adsense ads or any other network ads after single post can be the right choice to deal with. On Homepage or on category page or on tag page we have numbers of post (in most cases 7-10) on single page. Many of us concentrate on sidebar, header, footer or customizing ads in single page but fewer of them are worried about ad position on page where there are multiple posts.
How to add adsense or any html code after first post?
Step I : Go to WordPress Dashboard >>Appearance >> Editor.
Step II: Select the page to be edited say Home page ,category page or tag page (Here we will discuss about Home page i.e., index.php click on it)
Step III: Search for following php tag just press CTRL + F
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
Step IV : Add following code before above as
<?php $bscount = 1; ?>
Step V: Now look for <?php endwhile; else: ?> and place <?php $bscount++; ?> above it.
Step: VI : Finally place this code where you want your ads to be appeared between Step IV and V
<?php if ($bscount == 1) : ?>
<!– Your HTML/Adsense code here –>
<?php endif; $bscount++; ?>
If you want do display ads after 2nd or 3rd post then you just have to replace “1” by either 2 or 3 or with any no as per your requirement in all php tag showing “bscount == 1”.