0

Do you wish to hide old or out-of-date articles as well as posts from your blog's homepage without deleting all of them? Generally, bloggers don’t choose to hide the posts from their homepage. However in some unusual cases they also choose not to show all of them. A blogger never want to show some sort of finished giveaway articles or blog posts and out of date coupons as well as expired articles. After ending any giveaway you must have to hide that post from homepage of your blog so that new visitors should not participate in it. It also leave a bad impact on them. Every blogger want to serve merely fresh and excellent articles as well as content for you to his/her blog users. So today i am going to show you how you can hide specific posts from your blog's homepage.

How To Hide Specific Posts From Homepage Of Blogger Blog :

Method 1 :

  • First you have to login your blogger account.
  • After logging in go to blogger Dashboard>>Templates>>Edit html and search for the below code in your blog template html [ Use Ctrl+F to search ].
<div class="date-outer">
  • Now replace the above code with the following coding lines.
 <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;Your Post URL&quot;'> style=&#39;display:none;&#39;</b:if>
</b:if>
</b:if>
</b:if>
</div>&gt;
* Don't forget to replace Your Post URL with your blog article or post link which you want to hide from homepage.
  • If you want to hide more than one post than place the following code in above coding just before </b:if></b:if></b:if></div>&get;
 <b:if cond='data:post.url == &quot;Your Another Post URL&quot;'> style=&#39;display:none;&#39;</b:if>
  • In same way you can hide more post from homepage.Now save your template and view your blog homepage.That's it, you have successfully removed useless articles from your homepage.

Method 2 :

  • Go to blogger Dashboard>>Templates>>Edit html and search for the ]]></b:skin>  tag in blog template.
  • Then paste the following CSS code just above the ]]></b:skin> tag.
<style>
<b:if cond='data:blog.url == ... >
#YOUR POST ID {display:none}
</b:if>
  • Now Replace YOUR POST ID with your 19 digit unique post ID number.( You can show it in the post editor)
  • To hide more than one post, place the following code just below the above CSS code.
 <b:if cond='data:blog.searchLabel == ... >
#YOUR 2nd POST ID {display:none}
</b:if>
  • Your can hide more posts by placing above CSS code line again and again.After placing the code save your template and view your blog homepage to see changes.

How To Hide Posts Under Specific Labels From Blogger Blog :

  • Go to your blogger Dashboard>>Templates>>Edit html  and search for the following code in your blog template.
<b:if cond='data:post.dateHeader'>
<h2 class='date-header'>
<data:post.dateHeader/></h2>
</b:if><b:include data='post' name='post'/>
  • Replace the above four lines of coding with following code.
<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>

  • Replace Your Blog Label Name with specific label name which posts you want to hide from homepage.Congratulation you have successfully removed posts under specific label from your blogger blog homepage.

Post a Comment

 
Top