Hide things from blogger pages

Asked

Viewed 525 times

0

I’m creating a template for the blogger and would like to know how to hide some divs and widget of other pages, for example:
Not show the <div...> on the home page, only on a post page

1 answer

0


In blogger you can set conditions using <b:if cond='SUA-CONDIÇÃO-AQUI'> you can see the Data tags for layouts here

Display in specific pages

Display on the home page:
<b:if cond='data:blog.url == data:blog.homepageUrl'>


Display on bookmarks, files and home page:
<b:if cond='data:blog.pageType != "item"'>


Display on the posts pages:
<b:if cond='data:blog.pageType == "item"'>


Display in static pages:
<b:if cond='data:blog.pageType == "static_page"'>


Display only in a specific url:
<b:if cond='data:blog.url == "COLE-A-URL-AQUI"'>


Display only on file pages: <b:if cond='data:blog.pageType == "archive"'>




To hide the elements use the following

Hide on static pages:
<b:if cond='data:blog.pageType != "static_page"'>


Hide the item in the posting page:
<b:if cond='data:blog.pageType != "item"'>


Hide from bookmarks page, home page and file:
<b:if cond='data:blog.pageType == "item"'>


Hide widget on 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 closure </b:if> at the end of the element, example </div></b:if> > Click on Save Theme

Browser other questions tagged

You are not signed in. Login or sign up in order to post.