Friday, 3 April 2015

Hide Posts from the Homepage of Blog without Deleting it?

How to Hide Outdated and OLD posts from the homepage of a blog at Blogger is here. You are reading correct. Hiding posts from a specific label from the homepage of your blog is easy and in this way one can wisely keep the homepage of one's blog clean and full of latest update feeds. Every Blogger like to show only active posts on the homepage because the presence of expired freebies posts on the home of a web portal is not a good sign though.
Any blogger never intent to show his/her readers even a lambency of a expired freebie or older news. So there are three methods to hide posts on the home of a web-blog.

Hide Posts from the Homepage of Blog without Deleting it?

How to hide specific posts from the homepage of a blogger blog?

Method 1:

  • For any change in the appearance of a blog at blogger, admin has to enter into the Blogger dashboard. So, Goto Blogger Dashboard.
  • Now Open Template Menu and open edit HTML.
  • Now search for the code given below in the coding by pressing [Ctrl + F].
<div class="date-outer">

  • Now replace the code above with the following code snippet.
<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 URL&quot;'> style=&#39;display:none;&#39;</b:if>
</b:if>
</b:if>
</b:if>
</div>&gt

  • Make sure to replace Post URL with the post you want to hide.
  • In case, you have to hide more posts paste the below code just above  </b:if></b:if></b:if></div>&gt
<b:if cond='data:post.url == &quot;Your Another Post URL&quot;'> style=&#39;display:none;&#39;</b:if>

  • Again make sure you replace Your Another Post URL with your input. 
  • And so on you can hide more posts. Don't forget to save your template.

Method 2:

  • regardless of the above method, you have to find ]]></b:skin> in the template HTML and paste the below code just above it.
<style>
<b:if cond='data:blog.url == ... >
#YOUR POST ID {display:none}
</b:if>

  • Now replace YOUR POST ID with the 19 digit unique post ID. 
  • Now save your template and your done.

How to hide posts under specific labels on the blogger blog homepage?



  • Look for the below code in template HTML
<b:if cond='data:post.dateHeader'>
<h2 class='date-header'>
<data:post.dateHeader/></h2>
</b:if><b:include data='post' name='post'/>

  • Now replace the code  with below coding.
<b:if cond="data:blog.url == data:blog.homepageUrl">
<b:if cond="data:post.labels == &amp;quot;&amp;quot;">
<b:if cond="data:post.dateHeader">
</b:if></b:if></b:if><br />
<h2 class="date-header">
<data:post .dateheader=""></data:post></h2>
<b:include data="post" name="post">
</b:include>
<b:loop values="data:post.labels" var="label">
<b:if cond="data:label.isLast">
<b:if cond="data:label.name != &amp;quot;&lt;span style=&quot;color: red;&quot;&gt;Your Blog Label Name&lt;/span&gt;&amp;quot;">
<b:if cond="data:post.dateHeader">
</b:if></b:if></b:if></b:loop><br />
<h2 class="date-header">
<data:post .dateheader=""></data:post></h2>
<b:include data="post" name="post">
</b:include>
<b:else>
<b:if cond="data:post.dateHeader">
<h2 class="date-header">
<data:post .dateheader=""></data:post></h2>
</b:if>
<b:include data="post" name="post">
</b:include></b:else>
  • Make sure you replaced the Blog Label Name. Now save your template and enjoy.

Final Words.
If above tutorial helped you even a bit, don't bounce without leaving your comment below. Your words may help hundreds of bloggers.

Hi There, I’m Vashishtha! Just another tech-savvy blogger on the plannet with a super power of troubleshooting.


EmoticonEmoticon