I'm creating a template for blogger and would like to know how to hide some divs
and widget
from other pages, for example:
Do not show <div...>
on the homepage, just on the page of a post
I'm creating a template for blogger and would like to know how to hide some divs
and widget
from other pages, for example:
Do not show <div...>
on the homepage, just on the page of a post
In blogger you can set conditions using <b:if cond='SUA-CONDIÇÃO-AQUI'>
you can see Data tags for layouts here
Display on the home page:
<b:if cond='data:blog.url == data:blog.homepageUrl'>
Display page of bookmarks, files and home page:
<b:if cond='data:blog.pageType != "item"'>
Show in the pages of posts:
<b:if cond='data:blog.pageType == "item"'>
Display on static pages:
<b:if cond='data:blog.pageType == "static_page"'>
Show only in a specific url:
<b:if cond='data:blog.url == "COLE-A-URL-AQUI"'>
Show only in pages of files:
<b:if cond='data:blog.pageType == "archive"'>
Hide on static pages:
<b:if cond='data:blog.pageType != "static_page"'>
Hide the element in the posting page:
<b:if cond='data:blog.pageType != "item"'>
Hide bookmarks page, home page and file:
<b:if cond='data:blog.pageType == "item"'>
Hide the element on the home page use:
<b:if cond='data:blog.homepageUrl != data:blog.url'>
How to use:
Go to: Theme > Edit HTML > Find the element you want to hide > Paste the desired condition at the beginning of the element<b:if cond='??????'><div...>
and the closing</b:if>
at the end of the element, example</div></b:if>
> Click Save Theme