I was asked by a reader:
I’m using the THiCK theme for my new design blog. I noticed you were able to add thumbnail images above your blog posts on the home page. What would I need to do to enable this on my blog?
Well Jon, this can be done very simple, since the theme is already using the Tim Thumb script.
What you will need to do is find in your index.php
file, the second loop. Which you can find on line 40
.
<?php query_posts('offset=1&showposts=' . get_option('woo_other_entries') . '&cat=-' . $GLOBALS['ex_asides'] ); ?> <?php while (have_posts()) : the_post(); ?> <div class="post"> <h2><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2> <div class="post-meta"><?php the_time('j/m/y'); ?> <span>|</span> <?php comments_popup_link('0 Comments', '1 Comment', '% Comments'); ?></div> <?php the_excerpt(); ?> </div> <?php endwhile; ?>
Now we are going to add in the code. At line 43
we are going to add:
<?php if (get_option('woo_resize')) { // Check if we should use the image resizer ?> <a title="Continue reading this entry..." href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php echo bloginfo('template_url'); ?>/thumb.php?src=<?php echo get_post_meta($post->ID, "image", $single = true); ?>&h=80&w=280&zc=1&q=90" alt="<?php the_title(); ?>" /></a> <?php } else { ?> <a title="Continue reading this entry..." href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php echo get_post_meta($post->ID, "image", $single = true); ?>" alt="<?php the_title(); ?>" /></a> <?php } ?>
That’s it, just make sure that in the THiCK options panel you choose the “resize” option, or the image might break the layout. Or you may change the this code: $post->ID, "image",
to: $post->ID, "image_thumb",
and use a separate image for the lower blog.
In today's techno-centric culture, you simply must have a business website, no matter how small…
Photography is the art of capturing naturalistic images with the help of photographic cameras. It…
Have you opened up a new website or a business and want to drive more…
WordPress has evolved greatly from its origin as a powerful blogging platform to an effective…
Busіnеsѕеs аnd orgаnіzatіоns аll аrоund the wоrld arе loоking fоr а ѕоlutiоn thаt wоuld prоvе…
It is essential to draw people’s attention to your website or blog. It isn’t easy…
View Comments
Thanks for the post! I'm going to try this out this afternoon.
Absolutely, let me know how it goes!
I tried this but the the image double up the main featured article. So I have the Large image and then the smaller thumbnail under it. Both lead to the same entry.
Hmm, that's seems odd.
Nevermind, I was inserting on the wrong line. Looks like it was Line 45 for me.
Oh, Sorry about that. Maybe I shouldn't write what line it may be on.
Hope it works out! Just remember to look for the correct php code as well.
thanks for the post.
I don't know much about code, and I'm having the same problem of Thomas.
Could you show the exacto point to insert the code?
THANKS!!
thanks for sharing.
Bedava film izle´s last blog post..Lower Learning
Worked out nicely. I have another questions where would we go to do this on the actual category post in this theme.
Oh I got it. I added the same code in the first loop to the archives.php and you got a thumbnail for your category post.
Adrian Vianna´s last blog post..Tiger Woods Most Dominant Ever?
Yeah, that will take care of that! :)