Hiding All Posts From Blogger Home Page


Tip Abstraction:
        This tip describes how to hide all your posts from your blog home page in Blogger CMS.

Blogger allows us to control number of posts in home page by editing posts widgets in blogger layout dashboard. Maximum number of posts in home is 500 and minimum is 1. That is, minimum one post should be appear on blogger home page.

But in some cases, you may need to hide all post from home page, which may be for displaying something other on homepage than posts.

Here I am going to explain how to hide all articles from your blogger home page.

  • Open blogger dashboard
  • Go to Template tab.
  • Edit HTML. Before editing, please backup your site design by going back/restore option(right top).
Editing Blogger HTML in Temple tab
  • Now search for : ]]></b:skin>(Click inside HTML editor, and press Ctrl + F and type ]]></b:skin> on given text box and press enter key)
  • Add this codes just below of ]]></b:skin>:


<b:if cond='data:blog.url == data:blog.homepageUrl'>  
<style type='text/css'>
.post, #blog-pager {display:none;}
</style>
</b:if>


How it works?

<b:if cond='data:blog.url == data:blog.homepageUrl'> is a condition, codes under this statement woks if and only if the opened page is homepage.

Codes under this statement indicate no display for posts. If the opening page is not the home page, then this lines of codes will not work.
  • After successful editing, Save template.
Hide all article from blog home page

Now if you open home page, it should not show any post, but that will show others like sidebar.
If you want to hide sidebar, post footer etc, then add their id by comma.

<b:if cond='data:blog.url == data:blog.homepageUrl'>
<style type='text/css'>
.post, .footer, .post-footer, .feed-links, .post-title, .sidebar #blog-pager {display:none;}
</style>
</b:if>

After hiding posts, if home page still showing anything related to posts like published date, comments, Author Profile etc, then you have to edit Blog Posts widget
  • Open Layout tab
  • Edit Blog Posts widgets
Editing blog posts widget in layout blogger dashboard
  • Now from given small window or tab, remove items that are still showing on home page.
Post page options in blogger

Author hides all posts from their home page for displaying something other on home pages like linklist, photo gallery etc. Here you can read how to display a widget only in home page.






No comments:

Post a Comment

Your Support Is Our Motivation