What tutorial do you want for the next article! Request Here!

How to Adding Ad Units on Blogger

Guide to adding ad units on Blogger Layout. Add ad unit on iMagz, Fletro Pro, Median UI
Please wait 0 seconds...
Scroll Down and click on Go to Link for destination
Congrats! Link is Generated
How to adding ad units on Blogger Layout

All templates have a special slot/widget available for placing Adsense ad code, you can also hide the widget if you don't want to use it.

  1. We assume you have created a new ad unit on Google Adsense.
  2. On Blogger dashboard, click Layout, you will find several widgets with different colors
  3. Edit one of these widgets, click the icon and a new pop-up menu will appear:
    Blogger Widget HTML
  4. Fill in your ad unit code in the Content section,
  5. or click toggle button on 'Show this widget' to hide the widget.
  6. Click Save and wait a while for the ad to appear

Troubleshooting Post Middle Ads Not Showing

There are several conditions for the ad in middle of post to appear, namely:

  1. Ads only appear on paragraphs 10 and 20,
  2. the number of paragraphs is calculated based on <p> tag

Widgets for middle ads are tagged with IDs HTML01 and HTML02, script for the first middle ads:

<!--[ Script to move widget to the middle of article ]-->
<script>/*<![CDATA[*/ function insertAfter(tbh,tgt) { ... var midAd01 = document.getElementById('HTML01'); var showAd01 = tgt.getElementsByTagName('p'); if (showAd01.length > 0) {insertAfter(midAd01,showAd01[10]);}; /*]]>*/</script>

Script for the second middle ad:

<!--[ Script to move widget to the middle of article ]-->
<script>/*<![CDATA[*/ function insertAfter(tbh,tgt) { ... var midAd02 = document.getElementById('HTML02'); var showAd02 = tgt.getElementsByTagName('p'); if (showAd02.length > 0) {insertAfter(midAd02,showAd02[20]);}; /*]]>*/</script>
Description:
  • The numbers 10 and 20 are marked in two codes above to display ads in 10th and 20th paragraphs of post, you can adjust it to the number of paragraphs in your post.
  • The marked 'p' is a tag that is needed to display ads, if your post still uses <div> or <br> tags then middle ad will not appear, replace letter 'p' in the code above according to tag you use for paragraphs .
You May Like These Posts:

2 comments

  1. SABIR BRO
    This comment has been removed by the author.
  2. Paid script only
To avoid SPAM comments, all comments will be moderated before being displayed.
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems 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.