Showing Only Post Titles On Blogger
If you own a news website or a website where you post so many times in a day with lots of text and sometimes short posts then you probably need to show only post tiles on yourhomepage instead of whole content or some thumbnails.
This trick is very useful because sometimes you may post very little posts like "Someone Returns Tonight" and instead of checking the post your viewers can know who returned in theshort version in homepage like "Vampire returned at last night's Halloween party....Read More."
You don't wanna spoil that i mean you ruined Vampire's return because of your creepy blog. So now it's time to go practical...
Go To Blogger > Template > Mark 'Expand Widgets Templates'
Now find:
<b:include data='post' name='post'/>
Now replace above code with following:
<b:if cond='data:blog.pageType == "index"'>
<h3 class='title-only'><a expr:href='data:post.url'><data:post.title/></a></h3>
<b:else/>
<b:include data='post' name='post'/>
</b:if>
OK so after this your blog's post widget will look something like this:
Well you saved Vampire's return but your blog's post widget will look a bit ugly after this so now it's time to add some css.
Go To Blogger > Template
Search for ]]></b:skin> and just above it post following css:
/* -- Homepage Title Styling -- */
.title-only{
background: whiteSmoke;
padding: 10px;
color: black;
margin: 0;
border-bottom: dotted 2px;
}
.title-only:hover {
background: white;
}
Save your template and after doing all this your blog's post widget will look something like this:
That's It...For any help or if you want to nominate me for president then leave your responses in the comment section below..... :)
0 comments:
Post a Comment