How to display the Google Adsense between blogger posts in mobile home page view?
This post will explain the approach to display the adsense ads between posts in mobile home page view.Enable Custom template for Mobile view:
Make sure the custom template for the mobile view is selectedAdd adsense between posts in mobile home view:
Go to Blogger Dashboard > Theme > EDIT HTMLLocate <b:include data='post' name='mobile-index-post'/>
Replace
<b:loop values='data:posts' var='post'>
<b:include data='post' name='mobile-index-post'/>
</b:loop>
With
<b:loop index='x' values='data:posts' var='post'>
<b:include data='post' name='mobile-index-post'/>
<b:if cond='(data:x+1)%2==0'>
<!-- Add adsense code here -->
</b:if>
</b:loop>
Save Theme
This will display the add after every two posts in the blogger mobile home view - Change the condition based on your requirement
You can how test if the Google Adsense is displaying between the posts in mobile home view.
Hi
ReplyDeleteThis code is not working
done
ReplyDelete