Tuesday, 18 December 2012

Showing Only Post Titles On Blogger

Important: All scripts hosted on widcraft.googlecode.com don't work anymore because Google has blocked that SVN repository.

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 your homepage 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 the short 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:

 <!--Post Titles Only Trick-->
<b:if cond='data:blog.pageType == &quot;index&quot;'>
<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>
<!--www.BWidgets.com-->

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..... :)
Important: Check our new website TricksPanda.com for WordPress tutorials, plugins and more.
 
Powered by Blogger.