WordPress 2.9 introduces a brand-new feature — the “Post Thumbnail,” which simplifies the image management process. Previously, users had to manually insert images and perform various tasks to adjust image formats. With the “Post Thumbnail” feature, uploaded images are automatically converted into thumbnails of the desired size. Additionally, users can easily add featured images to their posts.
First, open the function.php file in your theme folder and add the following code to enable the “Post Thumbnail” feature:
When uploading an image in the post editor, simply check the box labeled “Use this image as the featured image” to set it as the featured image. Then, you can display the featured image in your post by adding the following code:
By default, WordPress automatically crops the featured image to a fixed size. You can specify the size of the featured image using the following code:
Here, you can replace “large” with other size names you prefer. Available sizes can be found in the settings in your WordPress dashboard.
If you want to add or update a featured image for posts that have already been published, the “Post Thumbnail” feature in WordPress 2.9 can do this easily. In the post editor, follow these steps:
The “Post Thumbnail” feature in WordPress 2.9 greatly simplifies image management. Users can automatically adjust the size of uploaded images and quickly add featured images to posts. To enable this feature, users need to add the necessary code in the functions.php file and make settings in the post editor. This feature provides significant convenience for users who want to streamline their content management.