Wednesday, November 2, 2022

How to show or hide the widget/ads in home/ post page in blogger blog

   
Show Hide Widget

Blogger is a free blog platform from Google to share your ideas, thoughts, tips, etc., for free without any cost. Most of the search results in Google will come from blogs only. If you search for any related computer tricks, Computer programs, or cooking recipes search results mostly from blogs only. The blog will play a major role in the internet to say answer your query. If you have a blog in blogger means and you want to showcase your content efficiently to your blog viewer. At that time you want to hide or show the ads, widgets, and contents on the home or post page. How to do this in your blogger blog. Here I will give the solution for hiding or showing the content on the blogger's blog page.

First login to your blogger account and go to the template page. Search the code in your template to display on a particular page and hide it on another page. Below I will give the list of codes to hide and show the widget, content, and ads in blogger for a particular page / all pages/post pages/home pages/static pages/archive pages.

Show only in the Home Page of your blog :
<b:if cond='data:blog.url == data:blog.homepageUrl'>
Your content code Here
</b:if>
Show only in the Post Page of your blog :
<b:if cond='data:blog.pageType == "item"'>
Your content code Here
</b:if>
Hide in the Post Page of your blog:
<b:if cond='data:blog.pageType!= "item"'>
Your content code Here
</b:if>
Show only in the Particular Page of your blog :
<b:if cond='data:blog.url == "URL of the page"'>
Your content code Here
</b:if>

In above Code you what to replace the URL of the page with your URL which page you want to specifically show the content

Hide only in the Particular Page of your blog :
<b:if cond='data:blog.url != "URL of the page"'>
Your content code Here
</b:if>

In above Code you what to replace the URL of the page with your URL which page you want to specifically hide the content

Show only in the Static Page of your blog
<b:if cond='data:blog.pageType == "static_page"'>
Your content code Here
</b:if>
Hide in the Static Page of your blog
<b:if cond='data:blog.pageType != "static_page"'>
Your content code Here
</b:if>
Show only in the Archive Page of your blog
<b:if cond='data:blog.pageType == "archive"'>
Your content code Here
</b:if>

Replace the above all, read the line with your widget, ads, html content code. Simple you can enclose your code with above any one of the code you want for your blog site.

No comments:

Post a Comment