If you are looking for a way to customise your blog to give it another look then you can start from customising your homepage. The homepage of your blog should have everything that will make your visitors love your blog. But you can not always post good stuff and you need some important stuff too in your blog that may not look good on your homepage.
So, to customise your homepage you need to filter your posts on your homepage. and unfortunately there is no way in blogger that you can do that directly but thanks to HTML codes that you can achieve anything in blogger.
Before that you need to get familiar with the powers of labels in blogger
FAQ- Lables
Maybe this is not a good question but your homepage layout has more value than anything else and you should have a cool landing page of your blog so that visitors can have a nice time on your blog.
Basically you can install third party templates to make your blog look good but it can be tricky sometimes as you can't fully control everything in those templates if you don't have basic HTML knowledge.
Enough talk let's customise the home page by filtering the post though labels.
This code will hide specific labels posts from your homepage. Your posts will be there in your blog but it will not appear on your homepage.
Cool isn't it?
Let's get started
Steps to follow
Don't forget to add the label name in that code. Here's how you can do that.
To add your label just replace the text in blue
Multiple Label Posts
In case, you want to hide multiple labels post use this code when you replace.
That's it pssssshhhhh!
Hey don't miss out this article:-
Show specific label posts in blogger
So, to customise your homepage you need to filter your posts on your homepage. and unfortunately there is no way in blogger that you can do that directly but thanks to HTML codes that you can achieve anything in blogger.
Before that you need to get familiar with the powers of labels in blogger
FAQ- Lables
So why you need to customise your homepage?
Maybe this is not a good question but your homepage layout has more value than anything else and you should have a cool landing page of your blog so that visitors can have a nice time on your blog.
Basically you can install third party templates to make your blog look good but it can be tricky sometimes as you can't fully control everything in those templates if you don't have basic HTML knowledge.
Enough talk let's customise the home page by filtering the post though labels.
What this code do?
This code will hide specific labels posts from your homepage. Your posts will be there in your blog but it will not appear on your homepage.
Cool isn't it?
Let's get started
Steps to follow
- Open blogger
- Go to 'Template' and select 'Edit HTML'
- Now search for this code
<b:include data='post' name='post'/>
- Now replace that code with this one
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<b:loop values='data:post.labels' var='label'>
<b:if cond='data:label.name != "LABEL-NAME-HERE"'>
<b:include data='post' name='post' />
</b:if>
</b:loop>
<b:else/>
<b:include data='post' name='post' />
</b:if>
- That's it save your template and you're done.
Don't forget to add the label name in that code. Here's how you can do that.
To add your label just replace the text in blue
<b:if cond='data:label.name != "LABEL-NAME-HERE"'>
Multiple Label Posts
In case, you want to hide multiple labels post use this code when you replace.
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<b:loop values='data:post.labels' var='label'>
<b:if cond='data:label.name != "FIRST LABEL"'>
<b:include data='post' name='post' />
</b:if>
<b:if cond='data:label.name != "SECOND LABEL"'>
<b:include data='post' name='post' />
</b:if>
</b:loop>
<b:else/>
<b:include data='post' name='post' />
</b:if>
That's it pssssshhhhh!
Hey don't miss out this article:-
Show specific label posts in blogger
not working mate :(
ReplyDeletewww.todayssalt.com
Hi there,
DeletePlease see if you're not missing a step as all of my codes are working and I check them myself before posting here.
Do leave me a message if you still can't any solution. :)
Hi. First at all thanks for your post. I'm trying to put it on my blog but when hide the post with de specific label, the homepage shows the last entry repeated and two post are missed. For example:
ReplyDeleteHomepage: Post1 - post1 repeated
Next page: Post 4 - post 5 - post 6 -post 7...
The hidden posts only have one label and the others one have anothers labels wicht aren't related with the label I want to hide. Any idea? :/ Thanks
Thanks for your comment.
DeleteThe issue might arise because of template. Are you using third party template?
Your code hides the posts that have ONLY that one specific label. But if a post has other labels as well, then it isn't hidden.
ReplyDeleteE.g. Label to be hidden="experiences"
A post tagged with only "experiences" is hidden, but another one tagged with "experiences" and "health" is displayed.
Thank you for your advice
ReplyDeleteDinesh singh
nice info.
ReplyDelete