Missing Set Featured Image

Posted February 18, 2011 by .

 

Sometimes our WordPress themes aren’t all we expect them to be and if you’ve found (or didn’t find) that the Set Featured Image sidebar is missing from the Post page here is the fix.

Open functions.php and add the following code:

add_theme_support( 'post-thumbnails' );

Now open index.php in the theme folder and add the following code just above your excerpt so it looks like the following:

<?php the_post_thumbnail();?> <?=the_excerpt();?>

Now edit the above to the following so the image becomes a link to the post.

<a href="<?=the_permalink();?>">
<?php the_post_thumbnail();?>
</a>
<?=the_excerpt();?>

Lastly open your stylesheet and add the following:

.attachment-post-thumbnail{width:150px; height:150px; margin:15px;float:left;-moz-box-shadow: 3px 3px 5px #888;
-webkit-box-shadow: 3px 3px 5px #888;
box-shadow: 3px 3px 5px #888;}

That should place a nice drop-shadow around the thumbnail image and float it to the left (or right) as you wish.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)


One Responseso far.

  1. John says:

    I was searching about this problem for a week now.. finally got the solution. Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>