In my article, Question for My Readers – What WordPress Tips Would You Like Me to Write About, Vered asked me a question about how to take the list of archives off of the main page. This is not as easy to do as you would think. I gave her a rough answer in the comments but will be writing a series of articles about archives. Interestingly enough, I am working on an archives issue with a client so it was timely that I was asked about it.
Today’s topic is how to make the archives more attractive and user-friendly with the Thumbnails for Excerpts Plugin. I tend to prefer coding rather than plugin solutions but this plugin provides a simple way to enhance your archives. Take a look at my archives here.
I am using excerpts, which is the default on most themes. Excerpts show the first 55 words of the post. Viewing a chronological list of posts that only contain the first 55 words is not a very useful way to review older content. The Thumbnails for Excerpts Plugin does not resolve the chronological issue but does make the archived post more viewable by pulling the first image from the post and creating a thumbnail of the image. You can see the images in my archives with the excerpts.
The plugin author notes that the images might not look good on all themes. They may also require some CSS tweaks in your stylesheet and some editing of the plugin’s php file.
The size of the thumbnail and it’s alignment, whether it is to the left or right set of the text, can be set in the thumbnailforexcerpts.php file. Near the top are two lines that look like,
define(“TFE_ALIGN”,”left”); //can be left or right
define(“TFE_SIZE”,”100″); //the size of the thumbnail; modify it for better integration with your design; if you set it as 0 it will be than the default size of your WP thumbnails, from admin area
You can change “left” to “right” and “100” to another size. Something between 75-150 is probably best.
If you want to style the thumbnails the class defined in the plugin is imgtfe. The CSS I use for my post images is
.left { float:left; } .right { float:right; } .frame { border: 2px solid #aaa; padding: 10px; } img.left { margin: 0 10px 10px 0; } img.right { margin: 0 0 10x 10px; }
and I want to use the same code for imgtfe but I don’t need to float the image right or left because I already had to make a choice about that in the .php file mentioned above.
.imgtfe {margin: 0 10px 10px 0; border: 2px solid #aaa; padding: 10px;}
This is adding a margin, padding (space between the margin and the text) and a border to the image thumbnail shown in the excerpts.
So, why not not just use the full post in the archives? Well, that is considered duplicate content by Google and can affect your search engine ranking, the big SEO. If you are using the All in One SEO Pack, you can choose not to have archives indexed so then it doesn’t matter if the content is the same. If not, it is better to use excerpts. Also, if I decide to dig through a site’s archives, I don’t want the entire article. I would rather scan the titles and a short blurb and the decide which articles I want to read. But that’s just me. Maybe you feel differently.
This is just the beginning of what I want to discuss related to archives. Other topics I want to discuss are Optional Excerpts, moving archives to their own page, ways to make the list of archives more interesting, and more.
How do you feel about archives? Do you think adding the images makes them more interesting? Do you prefer excerpts or full posts? Do you ever even dig through the archives on other sites?
photo credit: aureusbay
Vered - MomGrind says
I just don’t get archives. If I want to browse a blog, I just browse the categories, or sometimes I use the Search function.
Vered – MomGrind’s last blog post – A Weekend In Napa: 3 Days, No Internet, No Problem
Kim Woodbridge says
Hi Vered,
The current organization of them is not logical. Why would anyone say, “let’s see what Kim wrote in May 2007?” It doesn’t mean anything. Categories and tags are a much better approach. I’ve been thinking about this a lot and want to implement a better way on this site but am researching and asking people questions about different approaches.
I was directed to the archives on this site – http://www.webdesignerwall.com/archives/
Something like that divided into groups like WordPress, Twitter, etc. would work a lot better.
Earlier today on Twitter I asked, “Does anyone dig through the archives on blogs? Are they useful? What would improve them?” Jos Heuts replied on Facebook,
“I think using proper categories and tags and integrating them properly into the layout instead of as just eyecandy improves navigation and steers the reader away from the usual blog pitfall that only the most recent entries get read”
Maybe he is right … maybe we should do away with the archives and instead list our most popular articles by category or something like that.
I like to use search too, but WordPress search defaults to a by date search rather than by relevance. Since I mention WordPress all the time almost every articles is listed. I did install the Search Reloaded plugin, which sorts by relevance and that made a big difference.
Ajith Edassery says
Kim,
This one looks like a killer plugin in terms of looks… I plan to pick a better WP theme for my blog and overhaul it for DollarShower 2.0… One of the things I have in mind is a great homepage with a bigger excerpt of the latest article and thumbnails of the last four or so (to avoid recent posts widget). Then I need a proper archives and single post page… Looks like I have already found what archives could look like :) I would not mind if it’s a thumbnailed two column design as well…
Cheers,
Ajith
Ajith Edassery’s last blog post – The all-important 10 seconds to fame or shame!
Kim Woodbridge says
Ajith,
In terms of looks the plugin is great. What I’m trying to wrap my mind around right now is getting rid of the chronological based archives. It needs to be topical, I think.
Have you looked at the Arthemia theme? It’s a magazine style one that is free and pretty customizable. It might do what you are describing.
http://michaelhutagalung.com/2008/05/arthemia-magazine-blog-wordpress-theme-released/
And the demo
http://michaelhutagalung.com/arthemia/
Thanks!
Kim Woodbridge says
I forgot to mention that the plugin will do the same thing to your tag and category archives since om most themes they use the same pages.
Here’s an example from my WordPress category http://www.kimwoodbridge.com/category/wordpress/
Ajith Edassery says
Kim,
Thanks a lot for the detailed reply. Arthemia looks cool indeed. I am just wondering, though, whether I need to completely switch theme or somehow get mine fixed.
Do you have any feedback on my current theme? I am somehow not satisfied with it… Also it breaks in old browsers like IE6.
Cheers,
Ajith
Kim Woodbridge says
Hi Ajith,
I will take a detailed look at it later and let you know what can be done – probably via email.
Thanks!
Kim
Madhur Kapoor says
I have been using SRG Clean Archives plugin on my blog which is a nice Ajax enabled plugin. But this one with Thumbnail looks nice as well.
Madhur Kapoor’s last blog post – Split and Merge PDF files with Adolix Split and Merge PDF
Kim Woodbridge says
Hi Madhur,
I was looking at that plugin last week for some archives I am working on for another site. It does look really nice. I just looked at them on your site and think yours look better than on the plugin demo site :-)
Jake says
Archives work in more diary-like blogs.
For example, if I’m reading through a friend’s blog and they mention something happening earlier in the year I would be often rely on the dates to see what happened.
Kim Woodbridge says
Hi Jake – Thanks for stopping by and commenting :-) You’re right – that is a really good use of date based archives. I think most blogs – or at least the ones that I visit – aren’t structured that way.
Jess says
Hi Kim,
Find myself using your site a lot lately. Thank you!
One question: Do you know if you can use the Thumbnails for Excerpts plugin on search pages if search is configured to display the optional excerpts? Is there a way to use the Thumbnails plugin without using the optional excerpts field at all? Have been trying to find a solution for a client where we display a thumbnail in search results. However, we were only planning to use the Optional Excerpts fields for tag and category pages.
Secondly, do you know of any case studies where people are using Optional Excerpts with great success? Stephan Spencer touts the functionality as important but doesn’t seem to employ them on his own Netconcepts site.
Kim Woodbridge says
@Jess – Thank you for visiting and commenting.
I’m not sure about your first question. I use optional excerpts on my archives page and the thumbnail plugin works so I assume it will also work on the search page. I use Search Reloaded so that that the phrase that contains the keyword searched is displayed in the results rather than optional excerpts.
This article might help – it shows code you could use on the search results template as well as custom fields for the thumbnail. This does require, however, that the client fills in the custom field.
http://www.blogthority.com/75/how-to-add-image-thumbnail-using-wordpress-custom-fields/
I don’t know of sites that are using optional excerpts successfully. Pearsonified, however, has made a case for why they should be used,
http://www.pearsonified.com/2006/11/wicked-wordpress-archives-in-one-easy-step.php
Carolyn says
Thanks Kim, this is a great article. I have the plugin already installed and I really like it. The only change I want to make is adding the padding around the thumbnail. I don’t like how it butts right up against the text.
Since I’m a coding imbecile, my question is where do I add the two lines of code:
.imgtfe {margin: 0 10px 10px 0;
border: 2px solid #aaa; padding: 10px;}
to achieve this? Does it go directly in the php file for the plugin or somewhere else? Sorry to need all the hand holding!
Kim Woodbridge says
Hi Carolyn – You asked the question right when I was replying to comments :-)
It goes into the style.css file
Go to Appearance > Editor > Stylesheet (style.css)
It doesn’t matter where you put it – I usually add new code to the bottom so I can find it easily if I need to edit it some more.
Carolyn says
Thank you! Absolutely perfect. I really appreciate the hand holding :)
.-= Carolyn´s last blog ..Excited!!! =-.
Kim Woodbridge says
Hi Carolyn – Great! I’m glad it worked.
Carolyn says
Hi Kim, it’s me again.
I do really love this plugin, and the styling you so graciously gave me through this post. I have one more question. I’ve noticed since I started using this plugin that my RSS feed through feedburner is showing multiple copies of the same image it makes the thumbnail from. I use theme Thesis with WordPress. I’ve already asked in the Thesis forums and they dug through the XML and found it was indeed the imgtfe class that was redundant.
Have you heard of this happening before? Or can you point me in any direction for fixing it? Remember I’m a coding preschooler, but I did try to add the filter for catagories in my functions.php file changing ‘cat’ to TFE and the catagory number to ‘imgtfe’. I don’t know if that seems asinine, but it didn’t work. I’ve looked literally everywhere for a fix, but I can’t find one. Any suggestions?
.-= Carolyn´s last blog ..In search of me – Day 20 =-.
Kim Woodbridge says
Hi Carolyn – I really don’t have an answer for this. I’ve used the plugin on a couple of sites but haven’t run into this problem. But I’ve never used the plugin with Thesis – to me that implies that Thesis is doing something not the image class.
But I just looked at your feed and am not finding an example of the duplicate images – each post in the feed is showing the images that you have in each post. Unless the post is also showing images it shouldn’t be, I’m not clear on what the problem actually is.
Robert says
This is very frustrating. How do I get this to work with Thesis theme? The styling is all off and the images are tooooo close to the words. I don’t know what CSS is needed and where to paste the text. Can someone help?????
Kim Woodbridge says
Hi Robert,
The CSS that is needed would depend on how it looks in your theme and how you want it to look. The class that you need to use is
.imgtfe
which is listed above. Thesis uses a custom stylesheet, which you need to download from your webhost and then re-upload with your changes. This article might help you get started with Thesis customizations.
http://www.francisraymond.com/2009/01/how-to-customize-the-thesis-wordpress-theme-header-hooks-and-social-media-icons/
leandra says
Carolyn,
You may have already found a solution to this problem, but I was having the same issue with the thumbnails showing up twice using this plug-in. I managed to fix the problem by changing a bit of the code at the bottom of the thumbnailforexcerpts.php file:
Before:
}
return tfe_put_image($content);
}
else return $content;
After:
}
return ($content);
}
else return $content;
Good luck!
Kim Woodbridge says
Hi Leandra – Thanks so much for helping!
Amy @ Marvelous Mommy says
I installed the plugin and it works beautifully on my pages but I also have a slider on my page that already uses excerpts to show a thumbnail image.
How do I remove the excerpts from the slider but have it on the pages?? I have the “Apply on Home, Archives, & Search” set to NO but it still shows up in the slider.
I’d appreciate any help. I’d love to use this plugin!
Kim Woodbridge says
Hi Amy – I’ve run into that issue before with the testimonials that display in the header on certain parts of my site. You would need to find the css class used by the slider and then use something like this – this is the one I’m using for the testimonials so the class or ID would be different.
#testimonial .imgtfe {
display: none;
}
.imgtfe is the class used for the thumbnails and it is being set to not display them with testimonials.
Amy @ Marvelous Mommy says
OK I did…
.slider_post img.tfe{
display:none;
}
And it worked perfectly!! I have pages with excerpts!! http://marvelousmommy.com/category/giveaway/
Now I was wondering how to show more than three excerpt posts at a time?? I have my Settings>Reading set to display the 3 most recent posts.
I would like to keep my front page showing 3 posts but change my pages to show about 6 excerpts. Any advice??
Kim Woodbridge says
Hi Amy – You would need a query for that page that pulls six posts rather than the three that are in the settings.
http://veronicawong.ca/2009/10/wordpress-different-number-of-posts-per-page/
Since this is also for a specific category, you would also need to add something like
&category_name=wordpress or the number of posts on all category pages will change.
There is also a plugin
http://wordpress.org/extend/plugins/cbnet-different-posts-per-page/
Amy @ Marvelous Mommy says
I used the Custom Post Limits plugin by Scott Reilly. It worked perfectly! Thanks for your help!
Kim Woodbridge says
Hi Amy – Thanks! For the life of me I couldn’t remember the name of that plugin yesterday :-)
Codeless says
Thanks for the great info!
I’m using Thumbnails for Excerpts version 2.1 on WordPress 3.0.1.2.
I love it. Except it strips the html formatting on the index page. Is there any way to fix that? I really just need to keep the ‘s
Thank you for your help!
Kim Woodbridge says
Hi – I haven’t encountered that problem with the plugin but I don’t think I use formatting in my excerpts.
Codeless says
Are you using thumbnails for excerpts on this blog?
By formatting I mean breaks in paragraphs. They’re all removed with Thumbnails for Excerpts. Makes it look like bad grammar.
Any idea as to how I can fix that?
Thanks for your response!
Kim Woodbridge says
Aaah .. ok. No, I don’t use Thumbnails for Excerpts anymore because Post Thumbnails were added in version 2.9 and I switched to those. I think the issue you are having is with excerpts in general and not specifically with that plugin – excerpts in WordPress strip out html formatting by default. There are some plugins that deal with this but you would need to test if they will also work with Thumbnails for Excerpts.
http://wordpress.org/extend/plugins/advanced-excerpt/