By default search.php
just output the search results title and short description (depends on theme).
To show thumbnail as well just call the wordpress function the_post_thumbnail()
within the loop.
Try this:
<div class="entry">
<?php
if ( has_post_thumbnail() ) { // check if the post Thumbnail
the_post_thumbnail();
} else {
//your default img
}
the_excerpt(); //your short description
?>
</div>
Full Code:
<?php if (have_posts()) : ?>
<h2>Resultados de Búsqueda:</h2>
<?php include (TEMPLATEPATH . '/inc/nav.php' ); ?>
<?php while (have_posts()) : the_post(); ?>
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<h2><a href='<?php echo get_permalink($post->ID)?>'><?php the_title(); ?></a></h2>
<?php include (TEMPLATEPATH . '/inc/meta.php' ); ?>
<div class="entry">
<?php
if ( has_post_thumbnail() ) { // check if the post Thumbnail
the_post_thumbnail();
} else {
//your default img
}
the_excerpt(); //your short description
?>
</div>
</div>
<?php endwhile; ?>
<?php include (TEMPLATEPATH . '/inc/nav.php' ); ?>
<?php else : ?>
<h2>Ningún tema encontrado...</h2>
<?php endif; ?>