If You Want top backlinks or free guest posting on our blog Lets do it Join in Google News


how to put adsanse ads after the Fourth paragraph

SSalam everyone, on this occasion I will share how to install Adsense ads after the umpteenth paragraph, meaning that you are free to determine in which paragraph the ads will be displayed.

I have also applied this method to this blog, where I display an ad after the 2nd paragraph and after the 12th paragraph in this blog post.

and what if my post is less than paragraph 12 then the ad will not be loaded or displayed, because I have an ad set that only appears after paragraphs 2 and 12.

of course this method is very useful for the convenience of visitors because the ads that appear will adjust the length of our article, if the article is short then the ads that appear are also few, if the article is long then the ad will also adjust.

ok so if you want to try it let's see how below.

How to Install Adsense Ads after the Fourth Paragraph

please go to blogger select it temaand edit htmllook for the code <data:post.body/> usually there are more than one depending on the template used, you can choose the one in the conditional tag of the post page, if you don't understand just try one - one. if you find it, add this html code under the code <data:post.body/> and don't forget to replace <!-- AdSense Ad Code Here --> with your ad unit code

<div class='Blogger-StoreParagrafAds'>
<!-- your ads show here -->

if the ad does not appear / blank, it is recommended to parse the ad code and please try again

and finally put the javascript below above the </body> code if you don't find it it's probably already parsed so it will look like <!--</body>--></body>

<b:if cond='data:view.isPost'>
function Blogger-StoreParagrafAds(e){let a=document.getElementsByClassName("Blogger-StoreParagrafAds")[0];if(a){let n=document.querySelectorAll(".post-body p")[e-1];n.parentNode.insertBefore(a,n.nextSibling)}}Blogger-StoreParagrafAds(3);

pay attention to the number 3 that I marked, meaning that the ad will appear after the 3rd paragraph, please change it as needed, it is also important to use the <p></p> tag when creating a new paragraph, otherwise the ad will not appear

the script above is only for 1 ad, so if you want to add a 2nd and 3rd ad, you can use the same script by adding numbers in the Blogger-StoreParagrafAds class to Blogger-StoreParagrafAds 2 and Blogger-StoreParagrafAds 3 and so on

ok so that 's the way to put adsense ads after the paragraph to so hopefully useful.

Thanks for reading: how to put adsanse ads after the Fourth paragraph, Sorry, my English is bad:)

About the Author

Hi Greetings! thanks for reaching here, We are so delighted to welcome you on board. Your intelligence and energy make you an asset to your family and love ones.

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
It Look like there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.