Do you really want to make a default fallback image for WordPress post thumbnails in your website? A featured image is very important which...
Do you really want to make a default fallback image for WordPress post thumbnails in your website? A featured image is very important which is used as post thumbnails at all. It is very useful in engaging users and showing your articles more noticeable on social media website. In this article, I will show you how you can set a default fallback image for your WordPress post thumbnails.
Why You Should Need a Default Fallback WordPress Post Thumbnail?
A post thumbnail is a WordPress theme system which will allow you to combine an image with your website post or article. It generally depends on your theme; this image is then worked really well homepage, archives, or sidebar widgets at the same time. Some WordPress themes shows post thumbnail and extract of an article on the website homepage in a grid layout at all. If you really forget to include a post thumbnail for an article, then it will display without a thumbnail, and your layout will look wrecked.
Layout broken without post thumbnail
By inserting a fallback image, you may easily set a branded image to be used when post thumbnail is not found. This will allow you to ensure that all your contents have a post thumbnail at the same time. Other way to deal with this problem is generally using the desired Featured Image plugin. It will make it mandatory for all writers to insert a featured image to their contents before publishing. So now let’s see the methods of setting up Default Fallback WordPress Post Thumbnail
Method 1: Setting up Default Fallback Image for Post Thumbnails Using Plugin
This method is really easier and suggested for all users. First thing you will need to perform is to install and successfully activate the Default Featured Image plugin in your wordpress website. You can easily set up the plugin from the Plugin page of wordpress. At the time of activation, you have to visit the Settings » Media page to customize plugin settings.
Default featured image settings
In this page, you have to click on the ‘Select default featured image’ button to upload or choose the image you would prefer to use as your fallback post thumbnail at the same time. You need to forget to click on the save changes button after choosing your featured image. You can now easily visit your site to see it in action. The plugin will directly start showing your default fallback photos as post thumbnail for contents that do not have a featured image set at all.
Method 2: Add Fallback Image as Post Thumbnail Manually
This method normally requires you to write code to your WordPress theme database files. If you are not at home in doing this before, then you need to learn it. There are a lot of tutorial about this topics. So, first, you have to create an image which you want to use as the default image. On the next step, you have to upload it to your theme’s images folder by using a FTP client software. Your theme’s images folder should be located inside /wp-content/themes/yur-theme/ folder. If there is no image folder, then you need to make it.
After uploading image successfully to your website, the next step is to confirm WordPress to search this image when a post does not have its own post thumbnail at the same time. Your WordPress theme shows post thumbnails in different places. You have to look for the_post_thumbnail() function in theme database files. Mainly you can find it in archive.php, single.php, or content templates. Next, you need to insert the following code where you really want to show the post thumbnail. You have to be careful that you never forget to replace default-image.jpg with your own image file name. That’s all; now you can brows your site to notice it in action.
Method 3: Use the First Image in an Article as Post Thumbnail
This process also requires you to include code to your WordPress theme files carefully.
At first, you will need to add this code to your theme’s functions.php file or a website-specific plugin. This code simply shows the first image inserted to an article. Now you have to display this output in your wordpress theme.
To perform that, you will have to modify the theme files where post_thumbnail(); function is generally used. You have to replace it with the following code at the same time. By using of first time image as the post thumbnail in WordPress site, you can now visit your website to see it in action.
That’s all. I hope this article will help you to set default fallback image for WordPress post thumbnails in your site. You may now want to see best featured image plugins and tutorials for WordPress website. If you like this article please shares it with your friends. Thank you very much.
Read more:
- How to Switch from Blogger to WordPress without Losing Google Rankings
- How to Create a Video Portfolio in WordPress?
- How to Automatically Link Keywords with Affiliate Links in WordPress
- Link World
- How Use Social Media to Boost Email Subscribers in WordPress?
COMMENTS