Phone: 1-855-839-9966

Missing Set Featured Image

Home » Wordpress Tips » Missing Set Featured Image
Share this article on Facebook Share this on Twitter Stumble this article Share this on Google+ Share this on LinkedIn

Posted by Dave Lauretti on February 18, 2011

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();?>

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.

Get A Call Back

Latest SEO News and Tips