Featured ImageAllows visitors to get a glimpse of what's in your blog posts and pages. If these images are not appearing on your site, it can affect click-through rates. This article will show you how to fix featured images that don't appear in WordPress so that your content gets more clicks and engagement.
![图片[1]-如何修复 WordPress 中未显示的特色图片-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/07/2024071203302941.png)
Why don't featured images show up in WordPress?
Featured images usually appear on your blog post listing page and sometimes in the title of the post. They work similarly to YouTube thumbnailThe purpose is toIncrease page views and user engagement. Additionally, featured images are used to denote individual posts in recent posts, archives, and search pages, and to set the tone for blog posts.
How to Fix Featured Images Not Displaying in WordPress
1,Fix HTTP error when uploading featured image
![图片[2]-如何修复 WordPress 中未显示的特色图片-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/07/2024071203171686.png)
If you try to upload a featured image with a larger file size, you may get "HTTP Error"Message. This usually means that the pictureFile too largeor needIncrease the memory limit of your websiteTheSolution:
- Reduce image file size: Use image compression tools such as TinyPNG maybe JPEGminiThe
![图片[3]-如何修复 WordPress 中未显示的特色图片-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/07/2024071203175649.png)
- Increase WordPress memory limit: Modify wp-config.php maybe .htaccess file, or contact your web hosting provider.
compiler.htaccess fileIn order to do this, you need to go to the root folder of your WordPress site. Then, in the "#END WORDPRESS" line before you can paste the following code:
define( 'WP_MEMORY_LIMIT', '256M' );
2,Fix plugin or theme
Some WordPress themes and plugins may restrict the appearance of images. Check the theme settings or contact theme support. You can also deactivate all plugins and activate them one by one to find out what is causing thePlug-ins for ProblemsThe
3,Disable delayed loading
Delayed loading can improve page speed, but may cause loading issues with featured images. Disable the delayed loading feature in the plugin and clear the cache to see if that solves the problem.
utilization
Easily disable code with WPCode custom code snippets. First, you need to go from the WordPress dashboard to theCode Snippets " + Add Code Snippets page.
![图片[4]-如何修复 WordPress 中未显示的特色图片-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/07/2024071203214517.png)
Copy and paste the PHP code into the "Code Preview" box:
add_filter( 'wp_lazy_loading_enabled', '__return_false' );
![图片[5]-如何修复 WordPress 中未显示的特色图片-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/07/2024071203225862.png)
Make sure to open the plugin to make it active and click "Saving code snippets"Button.
4,Changing user role permissions
You may not be able to upload or view featured images if your user role has insufficient permissions. Use theUser Role Editor PluginChange roles and features to make sure your user roles are set up correctly.
![图片[6]-如何修复 WordPress 中未显示的特色图片-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/07/2024071203241449.png)
5,Fix featured image not showing on blog post gallery page
To display featured images on a blog post page, you can edit the page by adding "Latest Posts"block and enable the "Show featured image"Options.
6,Add custom code
If the current WordPress theme does not support certain features, you can use the WPCode Add custom code to solve problems. For example, add post thumbnails to the admin dashboard.
add_filter( 'manage_posts_columns', function ( $columns ) {
// You can change this to any other position by changing 'title' to the name of the column you want to put it after.
$move_after = 'title';
$move_after_key = array_search( $move_after, array_keys( $columns ), true );
$first_columns = array_slice( $columns, 0, $move_after_key + 1 );
$last_columns = array_slice( $columns, $move_after_key + 1 );
return array_merge(
$first_columns,
array(
'featured_image' => __( 'Featured Image' ),
),
$last_columns
);
} );
add_action( 'manage_posts_custom_column', function ( $column ) {
if ( 'featured_image' === $column ) {
the_post_thumbnail( array( 300, 80 ) );
}
} );
7,Fix featured image not displayed at correct size
Resize the default image size in WordPress. In the WordPress admin area go to "set up"""media, esp. news media", enter a new size for the featured image.
![图片[7]-如何修复 WordPress 中未显示的特色图片-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/07/2024071203254867.png)
8,Make sure featured images show up on Facebook
utilization All in One SEO plugin, enable the "Open Graph Markup" option to ensure that your featured image is displayed correctly on social media platforms.
![图片[8]-如何修复 WordPress 中未显示的特色图片-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/07/2024071203260452.png)
With these steps, you can solve the problem of undisplayed featured images in WordPress and ensure that your content is displayed in the best possible way, boosting click-through rates and user engagement.
Link to this article:https://www.361sale.com/en/13450The article is copyrighted and must be reproduced with attribution.
No comments