Hello Everyone! Welcome back to Techy DarshaN, Today on this occasion our tutorial is How to Remove Ads from Blogger Preview Post.
As you already know that Blogger (Blogspot) has a preview page feature to see the preview/demo of posts before they are published, and only Blog authors can see them. This preview page looks the same to same as the Post page, If you have Adsense approval it may also show the ads in the preview. But, it will be risky to your Adsense account.
Why Ads in Preview Post are Risky ?
Well, The appearance of ads on this preview page of course provides the risk of ads being clicked on themselves by blog owners by accidently. And this will certainly have a bad impact on the ad publisher account (Owner's Adsense Account). Therefore, to avoid the risk of the ads being clicked on their own, then the ads should be removed from the Blogger Post Preview. So, Here's the tutorial on How to Remove Ads from Blogger Preview Post.
How to Remove Ads from Blogger Preview Post ?
Step 1: Login to your Blogger Dashboard
Step 2: Create a New post or Edit a post in which you want to ads in Preview Post
Step 3: Switch to HTML View
Step 3: Now copy the below Conditional Tag and paste it in your post and add the ad code between the condition tag
<b:if cond='!data:view.isPreview'> YOUR AD CODE HERE </b:if>
Removing ads from Search, Preview, and Error (404) Page
In addition to remove the Ads on the Preview Post, It's a good idea to also eliminate ads on the search page to avoid bad keyword searches. Showing ads on pages and Error pages (404) is also ineffective and should be eliminated as well.
Here's the conditional tag code to eliminate ads on Post Preview, Search, Page, and Error (404) pages
<b:if cond='!data:view.isPreview and !data:view.isSearch and !data:view.isPage and !data:view.isError'> YOUR AD CODE HERE </b:if>
Displaying Ads only on your Posts
Although Ads are displayed only on the post page by using conditional tags for the post page, they still appear on the Post Preview. For that, we recommend using the following code to display ads only on the post page and not appear on the Post Preview:<b:if cond='!data:view.isPreview and data:view.isPost'> YOUR AD CODE HERE </b:if>
Displaying Ads only on your Homepage
Just like a Post Page, although an ad is displayed only on the main page using conditional tags for the homepage, it still appears on the Post Preview. For that, you should use the following code to display ads only on the homepage and not appear on the Post Preview:<b:if cond='!data:view.isPreview and data:view.isHomepage'> YOUR AD CODE HERE </b:if>
Displaying Ads Sidebar Widgets or Footers
But if you are displaying Ads in a sidebar widget or footer, then the one using this conditional tag not the ad code, but the widget. So what is left on the Post Preview is to hide the widget where the ad is like the following example:<b:widget id='HTML1' locked='false' title='Widget1' type='HTML'> <b:includable id='main'> <b:if cond='!data:view.isPreview and !data:view.isSearch and !data:view.isPage and !data:view.isError'> <!-- only display title if it's non-empty --> <b:if cond='data:title != ""'> <h2 class='title'><data:title/></h2> </b:if> <div class='widget-content'> <data:content/> </div> <b:include name='quickedit'/> </b:if> </b:includable> </b:widget>
<b:widget cond='!data:view.isPreview and !data:view.isSearch and !data:view.isPage and !data:view.isError' id='HTML1' locked='false' title='Widget1' type='HTML'> <b:includable id='main'> <!-- only display title if it's non-empty --> <b:if cond='data:title != ""'> <h2 class='title'><data:title/></h2> </b:if> <div class='widget-content'> <data:content/> </div> <b:include name='quickedit'/> </b:includable> </b:widget>
That's just the trick to get rid of ads on blogger preview pages, hopefully useful.
Conclusion
In this post I made step by tutorial tutorial on How to Remove Ads from Blogger Preview Post, and also gave some additional conditional tags which you can use it to Remove ads from Post Preview page and also some other pages to keep your adsense account safe. I hope you have liked this post and please do share with your friends and follow up our blog for more.