The simplest method would be to enable post_thumbnails in your theme and then use the_post_thumbnail in search.php.
Thread Starter
ttw
(@ttw)
Great, thanks! I’ll give it a go
Thread Starter
ttw
(@ttw)
I just added in the code but have not noticed any difference. Could you please check I inserted the code in the correct position? Thanks
http://thetechwhizz.com/?s=for&sa.x=0&sa.y=0&sa=Search
I can’t tell by viewing the displayed search page. Did you remember to place add_theme_support( 'post-thumbnails' );
in the theme’s functions.php file? <?php the_post_thumbnail();?>
can then be placed where you want the thumbnails to show within the Loop. Did you assign any thumbnails to the individual posts?
Thread Starter
ttw
(@ttw)
I positioned the code as such:
<?php the_post_thumbnail(array(100,100), array('class' => 'alignleft')); ?>
<?php while (have_posts()) : the_post(); ?>
<div <?php post_class() ?>>
<h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
<small><?php the_time('l, F jS, Y') ?></small>
I’m not too sure If I assigned the thumbnails correctly? I selected the upload button, uploaded my picture and then inserted it into the posts? Thanks
Go to Edit Post or Edit Page. Look in the lower part of the right-hand menu bar. Right near the bottom there should be a “Set Thumbnail” link. You need to use this to assign a thumb to the post or page.
Thread Starter
ttw
(@ttw)
Oh ok, thanks. I’ve set up the thumbnails now but they’re still not appearing. Did I position it correctly (code in previous post)? Thanks again
Thread Starter
ttw
(@ttw)
I’ve got all it all working now. Thanks for all your help