Do you have template for search results in your theme?
yeah im using twentyeleven theme so i have search.php and searchform.php.
its really baffling me, the thumbnail show in the home page and when there in there category just wont show when searching
That’s because the theme is specifically designed to not show images in search results pages. To add the images back, you would need a customised version of content.php in your child theme.
Like i said the thumbnail does shoe up when on the homepage and when i click on a catergory within the menu bar however just doesnt show when searching.
my content.php where the featured image code is looks like this
<div class=”entry-content”>
<?php the_post_thumbnail(‘thumbnail-feature’);?>
<?php the_content( __( ‘Read more <span class=”meta-nav”></span>’, ‘twentyeleven’ ) ); ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class=”page-link”><span>’ . __( ‘Pages:’, ‘twentyeleven’ ) . ‘</span>’, ‘after’ => ‘</div>’ ) ); ?>
</div><!– .entry-content –>
<?php endif; ?>
I think i have found the code preventing it showing, what do you think? SHOWN BELOW;
<footer class=”entry-meta”>
<?php $show_sep = false; ?>
<?php if ( ‘post’ == get_post_type() ) : // Hide category and tag text for pages on Search ?>
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ‘, ‘, ‘twentyeleven’ ) );
if ( $categories_list ):
?>
Do not edit the Twenty Eleven theme. It is the default WordPress theme and having access to an unedited version of the theme is vital when dealing with a range of site issues. First create a child theme for your changes.