StudioPress Community Forums
  StudioPress Community Forums > Forums > General Discussion
For help and support, access to your downloads, or to manage your account please log into My StudioPress.

These forums have been set to read-only so you can browse the existing topics for any questions you may have.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
  #1  
Old 02-27-2009, 03:30 PM
glampinggirl glampinggirl is offline
Registered User
Genesis Member
 
Join Date: Jan 2009
Posts: 7
Default Thumbnails in archive pages

Hi, I was wondering if it was possible to have the category archive pages show thumbnail images instead of the full sized image in the post. Is this an easy thing to code?
  #2  
Old 02-28-2009, 02:04 AM
adew adew is offline
Community Moderator
 
Join Date: Oct 2008
Location: Genève, Suisse
Posts: 14,270
Default Re: Thumbnails in archive pages

Hi,

Yes. You could try something like this. Find this in archive.php:
Code:
<?php the_content(__('Read more'));?><div style="clear:both;"></div>
and replace it with this:
Code:
<?php if( get_post_meta($post->ID, "thumbnail", true) ): ?>
[img]<?php echo get_post_meta($post->ID, [/img]" alt="<?php the_title(); ?>" />
<?php else: ?>
<?php endif; ?>
<?php the_content_limit(80, ""); ?>
<div style="clear:both;"></div>
This will also replace the full post content with an excerpt. You may have to play with the CSS to get this to look right. Take a backup of archive.php before you begin - just in case. :)
__________________
Ade
Themessence - Studiograsshopper

WordPress plugins: Dynamic Content Gallery | Reveal Page Templates | Custom Taxonomies Menu Widget

Check out the Genesis and Child Theme tutorials before posting your question - and please provide YOUR URL!
Make Andrea happy - read her Firebug tutorial and save yourself loads of time and effort.
  #3  
Old 02-28-2009, 10:00 AM
glampinggirl glampinggirl is offline
Registered User
Genesis Member
 
Join Date: Jan 2009
Posts: 7
Default Re: Thumbnails in archive pages

This works great, thanks for the help!!
  #4  
Old 03-01-2009, 09:32 AM
adew adew is offline
Community Moderator
 
Join Date: Oct 2008
Location: Genève, Suisse
Posts: 14,270
Default Re: Thumbnails in archive pages

Great! Glad it worked. :)
__________________
Ade
Themessence - Studiograsshopper

WordPress plugins: Dynamic Content Gallery | Reveal Page Templates | Custom Taxonomies Menu Widget

Check out the Genesis and Child Theme tutorials before posting your question - and please provide YOUR URL!
Make Andrea happy - read her Firebug tutorial and save yourself loads of time and effort.
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Add Thumbnails to the Category Archive Pages tutorials General Discussion 1 01-05-2010 12:18 PM
How to Add Thumbnails to Your Blog Page and Category Archive Pages tutorials General Discussion 1 01-05-2010 12:02 PM
How to show thumbnails on category and archive pages? webwowster General Discussion 1 07-13-2009 06:27 AM


All times are GMT -5. The time now is 05:04 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.