Saturday 28 October 2017

How to Hide Specific Posts From Homepage in Blogger

Hiding a specific or certain post from the homepage of your blogger blog might appear to be a repulsive act, but it does make sense on a few occasions. Recently, one of our users asked us how to hide specific posts from your Homepage in Blogger? This technique is essential for those webmasters who no longer want to display a post that is appearing on their homepage. The reason could be anything the post might be outdated, or it could be a giveaway article that does not look relevant to be displayed on homepage. Today in this article, we will show you how to hide specific posts from the homepage in blogger.


 The first thing you need to login into your blogger account and go to Templates >> Edit HTML (be sure you have taken a backup of your template, it is a good practice in case something went wrong you can use the backup) and search for the following code. You will find the below code somewhere near the BLOG1 Code.

<div class="date-outer">

Now correctly replace the above code with the following lines of coding by making sure you are exactly copying and pasting the right code. If you miss a single thing, then the code will not work and you may face some kind of errors.

<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-Link&quot;'> style=&#39;display:none;&#39;</b:if>
            <b:if cond='data:post.url == &quot;ANOTHER POST URL&quot;'> style=&#39;display:none;&#39;</b:if>
          </b:if>
          </b:if>
          </b:if>
       &gt;

After pasting the above code, now it is up to you which blog posts you would like to hide from your homepage. Replace Your-Post-Link with the URL of you post that you would like to hide from your homepage. You can hide multiple posts by adding more URLS in <b:if condition/> tag.

Congratulations: Once everything is done, save the template. Now go to your homepage and test if things are working according to the plan. If you follow the steps correctly, we are certain it would work just fine.

Source: Here

No comments:

Post a Comment