WordPress Complete(Sixth Edition)
上QQ阅读APP看书,第一时间看更新

Designating a featured image

As of WordPress 2.9, you can designate a single image that represents your post. This is referred to as the featured image. Some themes will make use of this, and some will not. The default theme, the one we've been using, is named Twenty Seventeen, and it uses the featured image to create a great looking, full-width bar right above the main content of the post. It also includes featured images on the front page, alongside every post. Depending on the theme you're using, its behavior with featured images can vary, but in general, every modern theme supports them in one way or the other.

In order to set a featured image, go to the Edit Post screen. In the right sidebar, you'll see a box labeled Featured Image. Just click on the Set featured image link. After doing so, you'll see a pop-up window, very similar to the one we used when uploading images. Here, you can either upload a completely new image or select an existing image by clicking on it. All you have to do now is click on the Set featured image button in the bottom-right corner. After completing the operation, you can finally see what your new image looks like on the front page. Also, keep in mind that WordPress uses featured images in multiple places, and not only the front page. As mentioned before, much of this behavior depends on your current theme.