Thumbnails on Directory Category pages

I've seen a few people mention this question, but haven't yet found an answer so I wonder if you can help.

The featured image is showing up fine on the single listing page, but what I want is for each listing on a listing-category page to have an image with it.

For example on this page: http://bit.ly/N8qV5h - I would like each entry to have its thumbnail showing. Is this possible?

  • gillis
    • Design Lord, Child of Thor

    Hi Joe

    Well that's promising that you have got it working.

    Yes, those entries on my directory do have featured images, so it must just be a matter of the template.

    I'm guessing therefore if I can work out which template is being used for the categories listing page I could (not that I'm particularly confident) try to adapt it.

    Unless you know an easier way?

  • aecnu
    • WP Unicorn

    Greetings gillis,

    Since you indicated that those items indeed have featured images, it is your current theme template that is not rendering the images.

    Though I do not know what theme it is that you are using, I have found the relevant code in my theme that is in fact rendering the listing in the category page:

    <div class="entry-post">
    		<h2 class="posttitle">
    			<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent Link to', THEME_TEXT_DOMAIN ) ?> <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
    		</h2>
    		<div class="entry">
    			<a href="<?php the_permalink() ?>"><?php the_post_thumbnail( array( 275, 100 ), array( 'class' => 'alignleft' ) ); ?></a>
    			<?php the_excerpt(); ?>
    			<div class="clear-left"></div>
    		</div>

    The top half is the text part of the entry and the bottom half below (taken from the code above) is the part that specifically renders the image:

    <div class="entry">
    			<a href="<?php the_permalink() ?>"><?php the_post_thumbnail( array( 275, 100 ), array( 'class' => 'alignleft' ) ); ?></a>
    			<?php the_excerpt(); ?>
    			<div class="clear-left"></div>

    Please advise if this gets your categories to render the image.

    Cheers, Joe

  • gillis
    • Design Lord, Child of Thor

    I do have one minor additional question... As I mentioned, I've got the featured image working on category listings, and have managed to display a larger version of the same featured image on the listing page, which looks great.

    But how, now, do I turn OFF the small featured image at listing level? Now it's there as a large image I don't need it small too... (eg, on this page: http://bit.ly/KNx868 )

    Of course, I want to turn off the small featured image at listing level, but not at category listing level.

  • aecnu
    • WP Unicorn

    Greetings gillis,

    Sorry for the delay in a reply, it appears that this ticket somehow got eaten by the ticket system and thrown in the back. I was rooting around today in the back and found it.

    In regards to removing the small featured image as you described you wanted to do, simply remove the coding that indeed renders the image.

    Actually I just visited your site to post the code that renders the small image and to locate it within Market Press, but it appears that you have already resolved it on your own.

    Thank you for being a WPMU Dev Member!

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.