Where’d My Featured Image Go???

Been playing around with this one all day.

There are thousands of themes out there for WordPress.  Some have done a much better job staying updated with all of WordPress’ capabilities… some don’t.  In this case, one theme in particular had the Featured Image coding missing… and then some.

Here’s the short version of the long support article: go to functions.php and search for

add_theme_support

In that section, you should see something similar to

//Use Featured Images.
add_theme_support( ‘post-thumbnails’, array( ‘product’, ‘post’, ‘page’, ‘movie’ ) );

In my case, all but the ‘page’, ‘movie’) arguments were missing.  Since I’m using WooCommerce, as well as wanting the images to show up in posts, I added the ‘product’ and ‘post’ requirements.  But you’re not done yet.

In order to have them show up in posts you need to edit the single.php.  I personally think the Featured Image looks better below the content of the post so I’m going to add the request to post the image afterward the content, not before, as you may see with other themes. Should look something like this:

<?php the_content(); ?>
<?php the_post_thumbnail( ‘single-post-thumbnail’ ); ?>

Hope this helps someone!

Advertisements
Posted in WooCommerce, WordPress

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 149 other followers

%d bloggers like this: