January 8, 2009

Show Only Titles In Blog Archives With Dates


You would have noticed that, visitors, do click on the monthly archive links [like Oct 2008, Dec 2008, etc. in the Blog Archive], in your blog. But if you write a lot, like 20-30 posts in a month, then all the posts will open in the archive page and it will take a lot of time to load that page. This can be very annoying for the visitor, and he/she may simply close your blog in the frustration.
So if you want to keep your visitors happy, then you should better NOT display the content BUT only their titles in the archive results page.

For doing so, follow these steps:

Log in to Blogger
Go to Layout, and click on "Edit HTML" tab.
and mark the tick-box "Expand Widget Templates"
Now find (CTRL+F) this code in the template:
<b:include data='post' name='post'/>

And REPLACE that line with this code:
<!--ARCHIVE-TITLES-STARTS-->
<b:if cond='data:blog.homepageUrl !=
data:blog.url'>
<b:if cond='data:blog.pageType != "item"'>
<b:if cond='data:blog.pageType != "static_page"'>
<li><a expr:href='data:post.url'>
<data:post.title/></a></li><br/><br/>
<b:else/>
<b:include data='post' name='post'/>
</b:if>
<b:else/>
<b:include data='post' name='post'/>
</b:if>
<b:else/>
<b:include data='post' name='post'/>
</b:if>
<!--ARCHIVE-TITLES-STOPS-->
I have already done this hack, in this blog, here have a look at the screen shot :

NOTE: Here's a new hack to show TITLES along with SUMMARY and IMAGE THUMBNAILS in Archive Pages.


46 comments:

Matthew Seymour said...

Hey great website... and great content. WIth this post you have hit on something very important that I was going to mention in a coming post. By having this excerpt content duplicated is bad for Search engine optimization for google.

Google specifically states that duplicated content over multiple pages will not be added into the google directory.

This is also the case for using excerpts, as this reduces the chance of this happening over the entire blog where content could easily be duplicated without the user knowing.

sarah said...

I recently came accross your blog and have been reading along. I thought I would leave my first comment. I dont know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.



Sarah

http://www.thetreadmillguide.com

Divya Sai said...

Hi Matthew
Yes you have added a really important point to this post, thanks for this.
Although Blogger blocks labels/categories thru the robots.txt file, but archives aren't blocked, so of course now content duplication can be avoided too by this method...

Divya Sai said...

Hi sarah

Thanks for your visit, and appreciation, u are always welcome here !

Sujith Bhakthan T R said...

hey thank u hav a look here
http://keralastatertc.blogspot.com/2008_12_01_archive.html

ning susiwi said...

I will learn a lot as your above post (show only titles..) and try to make my own blog more interesting.do not you mind coming to my blog here http://ptcinfoklik.blogspot.com

Divya Sai said...

@ Sujith
Good work !

@ning
Do not try to spam !

CA RAJAN GUPTA said...

All Hacks are very gooooooooooooooood and written in a professional way .A am trying to read each & every post of this blog whenever I had a Time.Hack are easy to understands and well explained.

Divya Sai said...

I am reallllllly glad you were here Rajan, thanks for appreciating the work !

Regards
Sai

KAPUSO ONLINE BLOGSPOT ADMIN said...

very nice tweak

what if i want to show title only in archives and searches but not in labels

since i have already tweak my labels to show maximum results only

thanks

Divya Sai said...

I would advice you to let this be applied to labels too, as even labels pages become too long, when visitors click on any label. By this method as only titles are shown in the result page, so people can then easily select the post they want.

nukta77 said...

Divya,
I don't know what some of us would have done if people like you wouldn't share their knowledge.
Whoever said, 'information is power' was very right, it is power indeed when shared correctly.
Thanks D, for helping me make my blog easy to navigate through!

Sujith Bhakthan T R said...

Is there any possible way to display the post titles with first few lines of the post?

Forum Panongkrongan said...

u're genius buddy! i'am a newbie n this twaek its really funtastic for me

Sai said...

Here's the new hack Sajith,

| Show titles along with images and summmary... |

Regards
Sai

Pianoes said...

Thanks u for sharing :)

sriharsha said...

hey plz help me out... I am unable to find the first line of code.

I use a modified template... My blog

Attrus said...

Fantastic. I had done this but I had to do it manually after every post. I would submit the date and title to another one of my sites that I set up just for that purpose. No More. Your tip has saved me so much work and it looks better than what I was doing and it doesn't take my readers away from my blog.

Excellent...Outstanding...Thank you
Attrus

Admin @ Blogger Templates said...

I am really glad you were here Attrus, thanks for commenting :)

Regards
Sai

jeep kiralama said...

Thank you very much for writing, I wish success

LikeItSpicy said...

Hi:
I used your hack, thanks a lot. Only thing is, now when I am on a post and I click the "next" or "previous" post links at the bottom, the resulting page also contains just the label, and not the entire post. Help! Did I mess something up?
Check it out at http://likeitspicy.blogspot.com.
Thanks in advance.

Divya Sai said...

@LikeItSpicy
JUst checked your blog, and the links are working fine. Also the hack is working good. Can you please rephrase your query...

LikeItSpicy said...

Hi:
From the home page, click "Next" at the bottom. Instead of displaying the entire next post, it displays only the post title. This happened after I inserted the hack. I am seeing this using Google Chrome and IE.

If I click on one of the labels, the resulting page displays only the titles - so the hack is working as it should. I just don't want the Next & Previous links also leading to only the post titles..

Were you able to see this now?

LikeItSpicy said...

Hi:
Just wanted to add to my question above. When you click "Next" from the home page, make sure you do not expand the post using "Read on..." link. You'll see that clicking Next displays only the post title of the next post.

If you do expand the post on the home page and then click Next, then the next post displays correctly. This is so bizzare, I am completely stumped. And this problem disappears if I remove the hack. Help!

Divya Sai said...

@LikeItSpicy
Okay I got your point, but actually this is a SEO trick, and one of the main purpose of doing is to avoid content duplication. Anyways presently Google has already adjusted it's algorithm and I think this hack is no longer needed for SEO.

What you want is not possible with this method, but you may try an other method to automatically truncate all your posts on homepage, labels-pages and also when you click "new" or "old" posts:
http://bloggerstop.net/2009/05/automatic-read-more-hack-for-blogger.html

LikeItSpicy said...

Not sure I understood your response. I DO NOT want to truncate posts on my home page or when I click Previous and Next. What is not possible with this method?
Thanks for your patience!

Divya Sai said...

...
you want this in your blog:
- only titles to appear when you click on labels.
- complete post to appear when you click on "new posts" link.
right?

but when you use this code, it will display the posts as titles in all pages except "hompage" and the actual "posts/articles pages".

so if you use the "automatic-read-more-hack" then whenever you click on labels, then the posts will be displayed in truncated form. and so, readers will select the posts themselves.
and also when you click on the "newer posts" link again posts will appear with a summary.

PS: Actually you'll like this hack more, if you display more than 1 post in your homepage (4/5 truncated posts).
Along with homepage, whenever you click on "newer posts" link again 4/5 posts will be displayed (again truncated posts)

LikeItSpicy said...

Understood, and thanks for explaining it to me. I'll try this out. I appreciate all your help, you have a great blog here!

Anonymous said...

Hi - I loved this hack. Very useful. Quick question - on the results page, is there a way to make the Label the page title?

Admin said...

Ilike this trick and add to my blog Long time i search in goole, yahoo and many search engine to this hack
This is most usfull Hack Bro

Thx Bro
Visit My Blog: http://www.bsongz.blogspot.com/

Mark said...

Opps. Wrong comment! Sorry. Please delete my above comment.
That comment should be in others blog posts.

BTW great tip.

Anonymous said...

This is really great! Thank you for this.

Do you have any idea how to do something similar for labels? It would be great to click on a label like "Charlie Chaplin", and get an alphabetized list of movies labelled "Charlie Chaplin".

Blogger Help said...

This hack also applies to labels, although not in alphabetical order, but according to the publishing dates.

Sunil Saharan said...

Hi this is not working on my Blog. Can you give the possible reason. My blog in http://complete-solution.blogspot.com
Please provide a sample text file with this code.
I will be thankfull to yoiu.
Sunil Saharan (admin{at}sunilsaharan.co{dot}cc)
Thanks again.

Divya Sai said...

Hi Sunil,

Just checked out an archive page on your blog...and found the script at its work.
This is the page I checked: http://complete-solution.blogspot.com/2010_02_01_archive.html

I checked a label page too and the posts were being displayed as titles in that page too (as expected).

ibox said...

doesn't wornking on my blog.. ~x(

there is no search term that you mentioned to do.. instead of this one..

Sunil Saharan said...

Hello Friends,
Thanks for the hack. It is working on archieve page but at homepage it is showing all posts. I want to show post title at home page not complete post. So please help me.
Regards,
Sunil Saharan

Sai @ Blogger Help said...

Use this method to truncate posts on homepage, it is up to you, if you want to show a small summary or want to hide complete posts:
http://bloggerstop.net/2009/09/read-more-is-official-now-and-static.html

Elizabeth said...

i implemented this code but am having problems with it. please if you have time, see how my archive looks. it is not very user friendly.

i recently switched templates to a more custom one from btemplates (suited for blogger).

i think i made a mistake, however, by saying "yes, keep widgets" when uploading the new template. could this be the problem for my archive (and a few other issues)?

please help. any advice would be most appreciated.

your fan,

-elizabeth (www.myrealitybit.com)

Sai - Blogger Help said...

Hi Elizabeth,

I don't think the code has been successfully been added to your template, and anyways I have just now updated this post, plz try it again and tell me if it works this time.

Elizabeth said...

thank you for your responses, sai.
i copied the code above in place of the original one line of code. my archives looked the same. i went into layout and under the archive widget, i changed it to "hierarchy." When I did this, the archives completely disappeared.

i am worried that these problems i am experiencing are due to when i switched templates and did the "keep widgets" option. is there any fixing this mess i have created?

anxiously awaiting help,
elizabeth

Divya Sai said...

okay, got your point...
Actually this post may be quite confusing for some bloggers.
Here we are not talking about the "Archives Widget"
Rather this is about the pages where archives are shown. For Example, in this blog if you click on the link "Dec 2009" in the sidebar (archives widget), you'll be shown the posts published during that period.
But if you apply this hack/tutorial, and again click on that link, then instead of showing complete posts, only "Post-Titles" will be shown and you have to click on any title to read any particular post. See the screenshot in the above post, to understand it better. Hope it helps...

Elizabeth said...

okay, i think i got it.

but can you answer me my other looming problem ... do you think the uploading of the new template, keeping the widgets on option is the hidden root of some of my problems?

i.e., when i implement adsense in between posts, that no longer works. also, i tried implementing the three column widget below, that wouldn't work. i used to have no problem doing things like this before.

if you think this is my problem, what do you suggest i do? i thought about uploading a new template, and this time, marking "don't keep widgets" option. however, i'm afraid of losing all the new seo code i recently implemented.

thanks for your time,
elizabeth

Sai - Blogger Help said...

Actually Elizabeth, that shouldn't be a problem. But I would also recommend a template change, if you are facing these problems. You may even try the new templates by Blogger.com or try any other template (I would recommend a light background and black text), and you may read on how you should go for the template change:
http://bloggerstop.net/2008/12/how-to-change-bloggerblogspot-templates.html

I have written that tutorial when there wasn't any option to "Keep widgets" while changing the template, so kindly read on how to retain your widgets without using that "keep widgets" button.

Superchef said...

Awesome!! thanks!! I mainly wanted it for the labels, based on which I have the different links on my "pages". Thanks!

boffin said...

great..awesome..mindblowing..u rock..

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

comment on this post Share Your Views

Allowed HTML tags: <b>, <i> and <a>

Join and share your views with other bloggers at BloggerStop Community

Comment Like This! and Optimize your blog...

SPAMMER OF THE MONTH: www[.]Seeking4Hosting[.]com

Next Post Homepage Previous Post

Regular Readers


What They Say...

Divya Sai is the ingenious webmaster of Bloggerstop.Net. Divya is extremely patient, knowledgeable and responsive... Bloggerstop.net has an abundance of articles on creating widgets, templates, hacks and ways to make your blog search engine friendly.
- Stacey @Pets With Allergies
I stumbled onto a great site. Sai, over at Bloggerstop.net has helped me tremendously and with great patience...for any and all questions regarding computer issues. And again, THANK YOU Sai.
- Cheryl @Cmash Loves To Read

More Here...

Popular Posts

Get this widget

| © 2010 BloggerStop.net | Blogger Widgets | Template by Dicas Blogger | Enhanced By Divya Sai | Privacy Policy