Skip to main content

How To Add AdSense Ad Anywhere Inside Blog Post

We all know that AdSense is one most preferred affiliate money making program run by Google. AdSense is a cookie based contextual advertising program that shows targeted ads, relevant to the content and reader of a website. I had already showed you how to add AdSense ad below post title and AdSense ad below blog post. In this post, I will show you how to add AdSense ad inside blog post together with AdSense ad below post title and AdSense ad below blog post. To add AdSense ad inside your blog post you need to perform the below steps carefully. Read also : How to protect your computer from WannaCry ransomware virus.

Steps to Create AdSense ad

To create AdSense ad code follow the below the five steps.

Step 1. At first you need to create AdSense ad. To create AdSense ad, login to your AdSense account.

Step 2. After login, click My ads and then click New ad unit

Step 3. Now you have two options to choose. One is Text & display ads and another is Matched content. You need to click Text & display ads. Read also : How to create and setup matched content ad unit.

Step 4. Type ad unit name and choose ad size. If you want large rectangle ads with 336 x 280 dimension then choose it otherwise I recommend you to choose Responsive ads to get better page impression.

Step 5. Now click Save button and then Copy the code.

Steps to add AdSense ad Inside Template

Step 1. Now in the below code, replace Add AdSense Code Here with your AdSense code and then Copy the whole code.

<div expr:id='&quot;adsmiddle1&quot; + data:post.id'/>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<div style='clear:both; margin:10px 0'>
<center>
Add AdSense Code Here
</center>
</div>
</b:if>
</b:if>
<div expr:id='&quot;adsmiddle2&quot; + data:post.id'>
<data:post.body/>
</div>
<script type='text/javascript'>
var obj0=document.getElementById(&quot;adsmiddle1<data:post.id/>&quot;);
var obj1=document.getElementById(&quot;adsmiddle2<data:post.id/>&quot;);
var s=obj1.innerHTML;
var r=s.search(/\x3C!-- adsense --\x3E/igm);
if(r&gt;0) {obj0.innerHTML=s.substr(0,r);obj1.innerHTML=s.substr(r+16);}
</script>

Step 2. Now switch to your blogger dashboard and click Theme/Template and then click Edit HTML.

Step 3. Now click any where inside the code and then press Ctrl + F on the keyboard to get search box.

Step 4. Type <data:post.body/> in the search box and hit enter on the keyboard. You will get this option twice or more time depending upon the template/theme but you have to stop at the second option.

Step 5. Now you need to replace  <data:post.body/>  with the above code to appear the ads anywhere inside the each blogger post. And to avoid any error or parse the template/theme, replace async with async='' of the AdSense ad code.

Step 6. Finally, click Save theme.

Steps to add AdSense ad Inside Blog Post

Now you just need to create a New Post and click HTML and add <!-- adsense --> code where you want to display the AdSense code inside the blog post. After Publish or Update the blog post. You can also add the code in an existing blog post.


That's it! Cheers. Feel free to comment and share this post on social networks as well as subscribe to this blog.



Recommended Post
Big on Hosting. Unlimited Space & Unlimited Bandwidth

Comments

Popular posts from this blog

How To Change Default File Download Path in UC Browser

All of us known that UC browser is the most popular, fast and less data consuming mobile browser for android devices. Many of us use UC browser on daily basis on our smart phones. By default UC browser has download path to internal memory device which is /storage/sdcard0/download. sdcard0 is the built in memory or internal memory of your device. Read also : How to fix HTTP and HTTPS Mixed Content Errors.

Do you know that this default download path can be changed? Since, internal memory is fixed, and once you exceed this value you can't download more. You need to move some data from mobile memory to the external memory which is sdcard1. If you change this default path to external memory card (sdcard1), you can download more data directly to your desired directory. Read also : How to Setup AdSense Page Level Ads and Fix Script Error.

Here, I will show you, how to change this default download path from internal memory card sdcard0 to external memory card sdcard1. To do so you need to…

How To Rename A WhatsApp Group

We all know that WhatsApp is the most popular messaging service for Android, BlackBerry, iPhone and for other platforms. In this post, I will show you how to rename an existing WhatsApp group. To rename an existing WhatsApp group your smartphone must have internet connection. After that you need to follow the below steps. Read also : How to track lost/stolen mobile phone and erase data remotely.


Step 1. Open WhatsApp application on your smartphone.

Step 2. After that you need to click CHATS tab and click on your group name.



Step 3. Once you click on your group name, you will able to see chat details. Now you need to click vertical dots located extremely top right corner and then click Group info. Read also : How to setup AdSense page level ads.


Step 4. Now you can easily rename your group. To rename the group just click Edit icon and then type the desired group name and click OK. Read also : How to protect your computer from WannaCry ransomware virus.


In this way you can rename a What…

Calculation of Total Marks, Percentage, Division, Remarks, Maximum & Minimum Number of Students in MS Excel

In this post, I will help you to learn how to calculate total marks, percentage, division, maximum number, minimum number and remarks of students of a class very fast. At first you need to look over the above image very carefully. The above image shows the marks obtained by six students of a class.

Formula to calculate Total Marks of all students within seconds 

First you need to find out the Total Mark of a single student who is on the top of the list i.e, Mani. To calculate Total Mark of Mani, click on the Total Mark cell address of Mani i.e, H6 and then type the formula =sum(1st subject's cell address i.e, b6:last subject's cell address i.e, g6) and then press Enter on the keyboard or click anywhere on the worksheet. Here b6 and g6 are cell address of 1st subject (English) and last subject (Biology) of that student. Read also : How to Enable HTTPS for Blogger Blog.

After getting results, click on the resultant cell address of Total Mark of the 1st student i.e., Mani an…

Change UC Browser Default Homepage in Android Phones

We all know that Android OS operated Smartphones and Tablets are great for web browsing. Like other browsers, uc browser has a default search engine Yahoo is set for web search. UC browser provides different kind of search facilities under 5 different categories namely Web, Video, Shop, Image and APP. Read also : How to protect your computer from WannaCry ransomware virus.

In this post, I will show you how to change the default search engines of uc browser in Android devices for their 5 different categories. To do so you just need to follow the below steps. Read also : How to Enable HTTPS for Blogger Blog.

Change Default Homepage for UC Web search

Step 1. At first you need to open UC browser
Step 2. After that click Search. Follow the below image.


Step 3. Once you click Search, you will able to see the default search engine's icon for Web search like y for Yahoo, g for Google. Now you need to click that search icon. Follow the below image. Read also : How to change UC browser defaul…

Enable Auto Save Forms & Passwords in UC Browser

Many of you use UC browser on daily basis on your smart phone but very less enable this feature. Enabling auto save forms and passwords allows the browser to remember the username and passwords. It gives you relief from entering username & password every time whenever you login to your email. Did you enable auto saving form & password? If not, then do it now. Read also : How to track lost/stolen mobile phone and erase data remotely.

In this post, I will show you how to enable auto save forms & password in UC browser in your Android phones. To do so you need to follow the below steps.

Steps to enable auto save forms and passwords

Step 1. At first open UC browser

Step 2. In the second step, tap on the horizontal bar.


On the next image, you will able to see Bookmarks, History, Refresh etc. icons. Now swipe this menu screen to the left and tap Settings. Read also : How to create custom AdSense Search Engine and make money from it.


Step 3.  Now on the Browser Settings, you w…

Set UC Bowser as Default Browser in Android Device

UC browser is the most popular and free mobile browser for android phones developed by UCWeb also known as UC Mobile. UC browser becomes most popular among mobile internet users because of its less consuming data than any other mobile browser. It can be downloaded from UCWeb or Google Play Store. Read also : How to protect your computer from WannaCry ransomware virus.

In this post, I will show you how to set UC browser as default browser in your Android phones. To do so you need to follow the below steps.

Steps to set UC browser as default browser

Step 1. At first open UC browser.

Step 2. In the second step, tap the horizontal bar. Read also : How to make money online from home.


On the next image, you will able to see Bookmarks, History, Refresh etc. icons. Now swipe this menu screen to the left and tap Settings. Read also : How to transfer large files without mobile data.


Step 3. Now you will able to see the option Set as Default Browser which is inactive.



Step 4. Now you need to t…

How To Delete / Deactivate / Reactivate a Pinterest Account

Pinterest is one of the best social network since it allows users to create boards and also to update boards with images. But what if you want to delete your pinterest account? Pinterest allows users to delete their accounts permanently or deactivate their accounts so that whenever a user like to come back easily can reactivate his/her account. So be sure what do you want? Read also : How to Setup AdSense Page Level Ads and Fix Script Error.

Do you want to delete your account permanently or deactivate your account? Keep in mind that by deactivating your Pinterest account, your profile and boards will not be visible on Pinterest also your twitter and facebook profiles will be unliked, if you had connected them earlier.

Steps to Delete/Deactivate Pinterest Account

Step 1: At first log in to your Pinterest account with your user name and password. Read also : How to Setup AdSense Page Level Ads and Fix Script Error.

Step 2: Click on your username locating right side at the top of the ho…