Ẩn Featured Image Trong Bài Viết Wordpress


Featured images also known as post thumbnails are a well-known WordPress feature supported by most themes.

They are the primary image for your blog posts, và they often appear next khổng lồ the heading on your trang chủ page and social truyền thông. All popular WordPress themes come with built-in tư vấn for featured images.

In this article, we’ll show you how to lớn easily add featured images or post thumbnails in WordPress.


Beginners Guide khổng lồ Featured Images in WordPress

Featured images are a WordPress theme feature. Almost all WordPress themes come with built-in tư vấn for featured images và display them beautifully across different areas of your WordPress trang web.


As humans, we find visual elements more engaging than plain text. Featured images help you make your blog pages look more appealing.

They also help you build user engagement and increase page views. Search engines & social truyền thông media websites may also use these images & display them in search results & social media news feed.

Mostly featured images are used for blog posts, but you can also phối featured images for pages và custom post types.

Note: Featured images are not the same as cover image. See the difference between cover image vs featured image in WordPress.Bạn vẫn xem: ẩn featured image trong nội dung bài viết wordpress

That being said, let’s take a look a how to easily add featured images in WordPress.

Video Tutorial

Subscribe to thietkewebhcm.com.vn name.vn

If you’d prefer written instructions, just keep reading.

Bạn đang xem: ẩn featured image trong bài viết wordpress

Adding Post Thumbnail or Featured Image in WordPress

To add a featured image in a WordPress post, simply edit or create a new blog post.

In the nội dung editor, you’ll find the featured image tab in the right column.


You need khổng lồ cliông chồng on the ‘Set Featured Image’ area, và this will bring up the WordPress media uploader popup.

From here, you can upload an image from your computer or use an existing image from your truyền thông media library. Once you select the image, simply clichồng on the Set Featured Image button.


WordPress will now show a preview of the featured image in the right column. However, the actual featured image would look different depending on your WordPress theme.

You can now save or publish your post và preview it khổng lồ see how the featured image will appear on your live trang web.

Depending on settings defined by your theme developer, your featured image will automatically appear with your posts.

How to Find and Effectively Use Featured Images?

Now, the next big question that most beginners come across is where to find images khổng lồ use as featured images?

Luckily, there are several resources available that you can use to lớn find không tính tiền images for your blog posts.

Our top favorites are:


Note: All these sources provide high-resolution images, which means they are large in filekích cỡ & dimensions. You’ll need to optimize images for the website before using them as featured images.

Featured images are handled by your WordPress theme. In order to change how your theme displays featured images, you’ll need some basic CSS or WordPress coding skills.

If you are comfortable with coding, then continue reading for more tips.

Theme Developers Guide to lớn Featured Image and Post Thumbnails in WordPress

The featured image is a popular feature supported by almost all WordPress themes. In rare situations, you may come across a theme that does not tư vấn featured images, or you may not lượt thích how they handle feature images.

In that case, you can add featured image support to lớn your theme or change how it appears.

If you are comfortable editing WordPress theme files và know your way around a little custom CSS, then you can vì chưng it yourself.

If your theme does not support featured images, then you’ll not see the option to lớn add a featured image in the content editor.

To add featured image tư vấn in a WordPress theme, you need to add this line of code in your theme’s functions.php file:

add_theme_support( "post-thumbnails" );This code will enable featured image tư vấn for posts & pages. You can now go to lớn posts or page bloông xã editor, and you will see the featured image option enabled.

However, when you phối a featured image, it will not automatically display in your WordPress theme. To display featured images in your theme, you need khổng lồ edit your templates & add this line of code where you want to display the featured image:

The files you add the above sầu code in will vary based on your theme. You will want to add the code inside your post loop.

Related: See WordPress theme hierarchy cheat sheet khổng lồ better understvà how themes work.

The above code is the basic function that you need to add featured image tư vấn and display featured images in your theme. To mix image size for featured images you upload, you need khổng lồ add this line of code khổng lồ your functions.php tệp tin.

set_post_thumbnail_size( 50, 50);The parameters for set_post_thumbnail_kích cỡ are in this order: width, height.

Xem thêm: Sửa Lỗi Không Thể Truy Cập Khi Share Ổ Giữa Các Máy Trong Win 7 Và 8

You can also set additional image sizes lớn use with the_post_thumbnail() function. For example:

// Image size for single postsadd_image_size( "single-post-thumbnail", 590, 180 );In this example we have sầu added a new image size called single-post-thumbnail with 590px with và 180px height.

Checkout our guide on adding additional image sizes in WordPress for more details.

If you have previously uploaded featured images, but they are still appearing in some other kích thước, then you need to regenerate thumbnails và image sizes for older posts.

Below is an example of the featured image function with specific image kích cỡ.

This is the broken-down version of the full functionality. There are many other things you can vì with featured images.

FAQs About Featured Images in WordPress

As a beginner, you may come across questions or issues when using featured images on your blog. Following are just some of the most frequently asked questions about featured images.

1. Why featured image is appearing twice on my posts?

Sometimes beginner add a featured image and then add the same image inside the content part of the post editor.

All you have sầu to vì chưng is remove sầu the image from the nội dung area & only use featured image metabox khổng lồ add featured image. For more on this topic, see our article on how to fix featured image appearing twice in WordPress.

2. What is the difference between the cover image & featured image?

Cover images are used in the nội dung area of your posts or pages. They are normally used khổng lồ separate different sections of a lengthy page or post.

Featured image is the representative image of an article. It does appear before or alongside the content but not inside the actual article.

For more on this topic, see our guide on the difference between cover image and featured image in WordPress.

3. How khổng lồ display featured images next to recent blog posts?

The WordPress blochồng editor comes with a ‘Lademo Posts’ block which allows you khổng lồ display recent posts with post thumbnails.

You can also display recent posts with thumbnails in sidebar widgets using Recent Posts Widget Extended plugin. For more details, see our article on how lớn display recent posts in WordPress.

4. How to remind authors to add featured image in WordPress?

Featured images are prominently displayed on your homepage, blog page, và other archive sầu pages.

If you or another author on your blog forgot khổng lồ set one & published the post then it will appear without a featured image. This will look bad và inconsistent, which is not good for user experience.

You can install & activate the Require Featured Image plugin, which will show a notification when anyone tries to publish a post without featured image.