WordPress 5 Complete
上QQ阅读APP看书,第一时间看更新

Designating a featured image

Another cool thing about WordPress—if we didn't have enough of those already—is that you can choose any single image as the featured image for a given blog post. For that purpose, you want to pick an image that represents the post well.

Some themes will make use of the featured images and display them prominently, while some will not. The default theme, the one we've been using, Twenty Nineteen, uses the featured image to create a great-looking, full-width bar right above the main content of the 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 another.

In order to set a featured image, once again look at the options available in the settings sidebar of the block-based editor. Upon switching to the Document tab, scroll down to the Featured Image section. There's a single button there labeled Set featured image:

When you click on it, you'll see a pop-up window, very similar to the one we used when adding images to a blog post. Here, you can either upload an entirely new image or select an existing image by clicking on it. All you have to do now is click on the Select button in the bottom-right corner. With that done, you'll see the image appear in the Featured Image section of the settings sidebar. However, seeing it there is just for your confirmation that the image was indeed appropriately assigned.

To see it in its full glory, you'll need to navigate to the frontend of your site and see the post in question like a reader would. Look at the following screenshot:

This a great example of a featured image in a live post. Remember, the impact of the featured image will be dictated by the theme of your blog.