techinfoBiT
  • News
  • Startups
  • Tech
    • Internet
    • Security
  • WebMaster
    • All
    • GEO
    • SEO
    • Server & Hosting
    • Tools
    • WordPress
    'Sorry, This File Type Is Not Permitted for Security Reasons' How To Fix This Error in WordPress Website Development-techinfoBiT

    ‘Sorry, This File Type Is Not Permitted for Security Reasons’ How To Fix This Error in WordPress

    What is DMARC Record in DNS and Why It is Important For Email Security-techinfoBiT

    What is DMARC Record in DNS and Why It is Important For Email Security?

    How To Generate SHA-256 Hash From the Command Line on Ubuntu Server - techinfoBiT-SHA-256,Ubuntu Server, Server Solution, Linux Hashing, File Integrity, Cryptographic Hash, sha256sum, Hash Generation

    How To Generate SHA-256 Hash From the Command Line on Ubuntu Server

    Cloudflare To Deprecate Auto Minify Feature On August 5, 2024 - techinfoBiT

    Cloudflare To Deprecate Auto Minify Feature On August 5, 2024

    What is Google Analytics 4 and How to Setup GA4 for Websites - techinfoBiT

    What is Google Analytics 4 and How to Setup GA4 for Websites?

    How To Use Multiple SPF Records In A Domain | Merge Multiple SPF Easily - techinfoBiT

    How To Use Multiple SPF Records In A Domain | Merge Multiple SPF Easily

  • Science Space
  • Gadgets
    • Laptop & PCs
    • Mobile Phones
    • Wearables
  • More
    • How-To Guides
    • Reviews
    • Telecom
    • Applications
    • Press Release
No Result
View All Result
Services
techinfoBiT
  • News
  • Startups
  • Tech
    • Internet
    • Security
  • WebMaster
    • All
    • GEO
    • SEO
    • Server & Hosting
    • Tools
    • WordPress
    'Sorry, This File Type Is Not Permitted for Security Reasons' How To Fix This Error in WordPress Website Development-techinfoBiT

    ‘Sorry, This File Type Is Not Permitted for Security Reasons’ How To Fix This Error in WordPress

    What is DMARC Record in DNS and Why It is Important For Email Security-techinfoBiT

    What is DMARC Record in DNS and Why It is Important For Email Security?

    How To Generate SHA-256 Hash From the Command Line on Ubuntu Server - techinfoBiT-SHA-256,Ubuntu Server, Server Solution, Linux Hashing, File Integrity, Cryptographic Hash, sha256sum, Hash Generation

    How To Generate SHA-256 Hash From the Command Line on Ubuntu Server

    Cloudflare To Deprecate Auto Minify Feature On August 5, 2024 - techinfoBiT

    Cloudflare To Deprecate Auto Minify Feature On August 5, 2024

    What is Google Analytics 4 and How to Setup GA4 for Websites - techinfoBiT

    What is Google Analytics 4 and How to Setup GA4 for Websites?

    How To Use Multiple SPF Records In A Domain | Merge Multiple SPF Easily - techinfoBiT

    How To Use Multiple SPF Records In A Domain | Merge Multiple SPF Easily

  • Science Space
  • Gadgets
    • Laptop & PCs
    • Mobile Phones
    • Wearables
  • More
    • How-To Guides
    • Reviews
    • Telecom
    • Applications
    • Press Release
No Result
View All Result
techinfoBiT

How To Add Thumbnails to WordPress Posts | Enable Featured Image

Nishant Kumar by Nishant Kumar
December 28, 2018
Reading Time: 4 mins read
Share on FacebookShare on Twitter > XShare via WhatsAppShare on LinkedIn

Most of the premium WordPress templates for the blog or any kind of the websites are coming with the prebuilt option or feature to show the thumbnail photos on the image which is also called as featured image. But, still, there are many WordPress templates which do not have the option to set the featured images or display the thumbnail images for the blog posts.

Since WordPress 2.9 there is built-in functionality for post thumbnails. Prior to that several tweaks were used to generate the thumbnails. In this article, I am going to mention the trick to implement the thumbnail core-functionality into the theme.

You might also like

How to Install Let's Encrypt SSL on Ubuntu 24.04 VPS, Free HTTPS for All Website - techinfoBiT

How to Install Let’s Encrypt SSL on Ubuntu 24.04 VPS, Free HTTPS for All Websites

June 3, 2026
How to Deploy a Spring Boot Application with PostgreSQL on Ubuntu 24.04 VPS-techinfoBiT

How to Deploy a Spring Boot Application with PostgreSQL on Ubuntu 24.04 VPS

June 2, 2026

Related Post: How to Leverage Browser Caching (Apache)

How To Enable WordPress Featured Images Feature:

With the release of WordPress version, 2.9 featured image feature is enabled and added by default so a core functionality to add thumbnails was required to ease things up. The first thing you should consider is to update the WordPress core, template, and plugins; please do not forget to take backup of the entire website before updating performing any updates or upgrade process. If everything is updated and still you are not getting the featured images to feature then follow the following steps.

Related Post: Display the First Image in Post as Thumbnail for WordPress Posts

As any extended theme feature, support for it must be declared in the theme’s functions.php. Here’s how a standard implementation looks like:

if (function_exists('add_theme_support')) {
add_theme_support('post-thumbnails');
set_post_thumbnail_size(150,150);
}

In this case, thumbnail support is added for both posts and pages. Let’s say you want to have this feature only for posts. In this case, change the second line to this:

add_theme_support('post-thumbnails',array('post'));

The default thumbnails size is fixed as 150x150px and the images are resized. If you want images to be cropped instead of resizing it then you will have to change the third line as follows, basically, you need to add the true at the end of the code.

set_post_thumbnail_size(150,150,true);

You can also change the image resolution for the thumbnail images but I would recommend you go to Settings › Media and set the thumbnail size and scaling method from there.

This only tells WordPress that post thumbnails are supported and adds an option to set the thumbnails in the editor. To display the thumbnail, the following code must be added in the template’s function.php file to display the thumbnail:

if (function_exists('has_post_thumbnail') && has_post_thumbnail()) the_post_thumbnail();

Several parameters can be given to the_post_thumbnail() function, I will stick only to one of them: size. The default  thumbnail size can be overridden in the following manner:

the_post_thumbnail(array(300,300));

The numbers correspond to width and height. In place of the array, predefined sizes can also be added, like ‘thumbnail’, ‘medium’ and ‘large’.

If you have done everything correctly then now, if you go to the editor, you’ll see a nice new box called Featured Image, located on the right column, below the post tags, as To select the image you would like to use as a thumbnail, click on the “Set featured image” link. “The Add an Image dialogue will show up where you can upload an image or select one from the Media Library.

From here you can also select the size in which you would like to display the thumbnail; ignore the alignment as it does not apply in this case. I would like to recommend to use the same size of featured images for each and every post and even if you are inserting the images in the posts try to maintain the size of the images for every post, you may need to check which image resolution is going with your website design. When you are adding the thumbnail or featured images to the post remember to click on “Use as featured image” link proceed with saving it, shown in the image below.

How To Add Thumbnails to WordPress Posts | Enable Featured Image - techinfoBiT

Tags: Add Thumbnails to WordPressEnable Featured imagesFeatured ImagesHow ToSet Featured ImagesThumbnails to WordPressWebMasterWordPressWordPress CodexWordPress Tips
ShareTweetSendShare
Previous Post

Why Windows PCs are the Easy Target For The Attackers

Next Post

Leverage Browser Caching to Improve Site Speed of WordPress Sites

Nishant Kumar

Nishant Kumar

Nishant is a passionate tech blogger and has been writing about technology since 2007. His insatiable love for gadgets has made him closely follow the advancements & innovations our society has made in terms of technology since a long while now. Nishant is a highly sought after reviewer with many manufacturers requesting his opinions about their products. He covers Mobile Phones, Gadgets, Tools and all kind of tech products to give consumers Genuine Reviews, Buying Guides and reliable news.

Related Articles

How to Install Let's Encrypt SSL on Ubuntu 24.04 VPS, Free HTTPS for All Website - techinfoBiT

How to Install Let’s Encrypt SSL on Ubuntu 24.04 VPS, Free HTTPS for All Websites

by Nishant Kumar
June 3, 2026
0

One of the final and most important steps when launching a website or web application is enabling HTTPS. Whether you're hosting a WordPress website, a Spring Boot application, a Laravel...

How to Deploy a Spring Boot Application with PostgreSQL on Ubuntu 24.04 VPS-techinfoBiT

How to Deploy a Spring Boot Application with PostgreSQL on Ubuntu 24.04 VPS

by Nishant Kumar
June 2, 2026
0

Deploying a Spring Boot application on a VPS involves more than simply uploading application files to a server. A production deployment typically includes a Java runtime, a PostgreSQL database, a...

how to type in Hindi 2026, Hindi typing Windows 11, Google Input Tools alternative, type in Indian languages, Hindi phonetic keyboard Windows, Microsoft Indic Language Input Tool, Gboard Hindi typing-techinfoBiT

How to Type in Hindi and Indian Languages on Any Device in 2026

by techinfoBiT
May 31, 2026
0

If you have been searching for the Google IME offline installer lately, you already know the bad news. Google quietly discontinued the Windows installer years ago. The download links are...

Ubuntu Server How To Find Largest File In Directory Recursively - techinfoBiT

Ubuntu Server: How To Find Largest File In Directory Recursively

by Nishant Kumar
March 24, 2025
0

When managing an Ubuntu Server, disk space can quickly become an issue, especially if large files accumulate unnoticed. If you need to identify the biggest file within a directory (including...

Load More
Next Post
Leverage Browser Caching to Improve Site Speed of WordPress Sites - techinfoBiT

Leverage Browser Caching to Improve Site Speed of WordPress Sites

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.

techinfoBiT | Startup & Tech News, Reviews | WebMaster, How-To Guides-Tech Blog-Startup Blog India

techinfoBiT is your go-to source for the latest startup & tech news, technology reviews; WebMaster, SEO tips and how-to guides to help you stay updated and navigate the digital world know more

  • About
  • Contacts
  • Disclaimer
  • Privacy Policy

© 2012-2025 techinfoBiT | All Rights Reserved

No Result
View All Result
  • News
  • Startups
  • Tech
  • WebMaster
  • Gadgets
  • How-To Guides
  • Science Space
  • Services

© 2012-2025 techinfoBiT | All Rights Reserved