Pages

Sunday, November 8, 2015

How to Hide Specific Posts from Blogger Homepage

Hide Certain Posts From Blogger Homepage


A post on How to hide specific posts from blogger homepage. This blogger trick of hiding certain posts on your blogger blog homepage will make it possible to remove posts which you don't want to be shown to your readers without actually deleting them. Excluding/hiding these post from the homepage can be done on posts which you think are not relevant to be displayed. To implement this on your blog,  follow the steps given below on how to hide specific posts from blogger homepage.

Hide Posts From Homepage Blogger

  • From your blogger dashboard,
  • Goto Template
  • Backup your blogger Template
  • Next, Click on Edit HTML
  • With CTRL+F keys, search for this line of code <div class="date-outer"> (If you can't find it on searching, click on Jump to widget, then select Blog1. Look closely below Blog1 and you'll find <div class="date-outer">)
  • Replace the code above with the one below


<div class="date-outer"
<b:if cond='data:blog.pageType == &quot;index&quot;'>
<b:if cond='data:blog.searchQuery == &quot;&quot;'>
<b:if cond='data:blog.searchLabel == &quot;&quot;'>
<b:if cond='data:post.url == &quot;POST-LINK-A&quot;'>style=&#39;display:none;&#39;</b:if>
<b:if cond='data:post.url == &quot;POST-LINK-B&quot;'>style=&#39;display:none;&#39;</b:if>
</b:if>
</b:if>
</b:if>
&gt;

  • In the code above, replace the fields POST-LINK-A and POST-LINK-B with the URLs of the posts which you want to hide from your blog's homepage.
  • By default, you can only hide two posts on your blog's homepage using the code above. To hide more posts, add this line of code shown below after the highlighted </b:if> in the code or to hide only one post remove this line of code shown below after </b:if>.


<b:if cond='data:post.url == &quot;POST-LINK-B&quot;'>style=&#39;display:none;&#39;</b:if>

  • Save your template.
On viewing your blog, any post which you included its URL in the code above will be hidden from your blog's homepage. To make it show again, return to your template and remove the lines of code that you recently added or upload your blogger template which you recently backed up.