Skip to main content

How to Add Featured Images or Post Thumbnails in WordPress Themes



In this tutorial, I'll teach you how to add a featured image in a WordPress post, simply click on “Set Featured Image” link inside the featured image meta box shown in the screenshot above.
This will open the WordPress Media Uploader. You can use that to upload an image from your computer or use an existing image from your media library. Once you select the image, simply click on Set Featured Image button.
Setting a featured image in WordPress
The image will appear in the Featured Image meta box, like this:
A featured image added in a WordPress post
It is important to note that the image may appear a little bit differently in your theme. It all depends on how your theme handles featured images.
Some magazine themes use smaller thumbnails along side post summaries on the main page, and a larger version on the single post view.
Depending on settings defined by your theme developer, your featured image will automatically appear with your posts. However, if you want to change the way your theme handles featured images and post thumbnails then continue reading.
Note: Everything below this will require coding knowledge.

Theme Developers Guide to Featured Image and Post Thumbnails in WordPress

Even though featured image is a popular feature supported by a large number of themes, it is still possible that you might be using a theme that does not support featured images. In that case, you can add featured image support to your theme. If you are comfortable editing theme files and know your way around a little CSS, then you can do it yourself.
To add featured image support in a WordPress theme, you need to add this line of code in your theme’s functions.php file:
1
add_theme_support( 'post-thumbnails' );
This code will enable featured image support for posts and pages. You can now go to posts or pages, and you will see featured image option enabled. However, when you set a featured image it will not automatically display in your WordPress theme. To display featured images in your theme, you need to edit your templates and add this line of code where you want to display the featured image:
1
<?php the_post_thumbnail(); ?>
The files you add the above code in will vary based on your theme. You will want to add the code inside your post loop.
The above code is the basic function that you need to add featured image support and display featured images in your theme. To set image size for featured images you upload, you need to add this line of code to your functions.php file.
1
set_post_thumbnail_size( 50, 50);
The parameters for set_post_thumbnail_size are in this order: width, height.
You can also set additional image sizes to use with the_post_thumbnail() function. For example:
1
2
// Image size for single posts
add_image_size( 'single-post-thumbnail', 590, 180 );
In this example we have added a new image size called single-post-thumbnail with 590px with and 180px height. To use this image size in our theme, we will still need to add it in the appropriate theme file. 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 size, then you need to regenerate thumbnails and image sizes for older posts.
Below is an example of the featured image function with a specific image size.
1
<?php the_post_thumbnail( 'single-post-thumbnail' ); ?>
This is broken down version of the full functionality. You can further extend the functionality of featured images. For example, you can set a default fallback image for post thumbnails, display featured images with captions, or even add multiple post thumbnails or featured images.
We hope that this article helped you learn how to add featured images or post thumbnails in WordPress. You may also want to check out our list of 14 best featured images plugins and tutorials for WordPress.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Comments

Popular posts from this blog

NEWS: Davido likes VeryDarkMan’s post accusing him and his uncle, Governor Ademola Adeleke, of disguising their political alignment.

  Davido likes VeryDarkMan’s post accusing him and his uncle, Governor Ademola Adeleke, of disguising their political alignment A single social media interaction has put Afrobeats superstar Davido in the spotlight after he reportedly liked a controversial post by activist VeryDarkMan accusing him and his uncle, Osun State Governor Ademola Adeleke, of disguising their political alignment. The development has sparked conversations across social media, with users debating the possible significance of the singer’s engagement with the post. VeryDarkMan, known for his outspoken views on political and social issues, has repeatedly drawn public attention through his online commentary and criticism of prominent Nigerian figures. Davido, whose real name is David Adeleke, is one of Nigeria’s most recognisable music stars and a member of the influential Adeleke family. His uncle, Governor Ademola Adeleke, remains a key figure in Osun State politics. However, it remains unclear whether Davido’s...

5 Best WordPress Forum Plugins to Build an Online Community

  Are you looking to transform your WordPress website into an interactive online community where visitors can ask questions, share ideas, and connect with one another? Installing a reliable WordPress forum plugin is one of the easiest ways to achieve this. Whether you want to build a discussion forum like Nairaland, a customer support community, or a platform for sharing knowledge, WordPress offers several powerful forum plugins. Here are five of the best WordPress forum plugins to consider in 2026. 1. wpForo Forum wpForo is one of the best WordPress forum plugins for building a modern online community. It provides multiple forum layouts, user profiles, discussion categories, topic subscriptions, and moderation tools. Its responsive design makes it suitable for both mobile and desktop users. It is an excellent choice for website owners who want a feature-rich forum without building everything from scratch. 2. bbPress bbPress is a lightweight and popular WordPress forum plugin devel...

5 Essential MyBB Forum Plugins Every Forum Owner Should Know

            Are you planning to build a successful online community with MyBB? Choosing the right plugins can make your forum more attractive, secure, user-friendly, and easier to manage. Whether you are creating a discussion forum like Nairaland or building a community around technology, entertainment, sports, or business, MyBB plugins can help you improve your website's functionality. Here are five essential MyBB forum plugins worth considering. 1. MyAlerts: Keep Members Updated Member engagement is essential for every successful online forum. MyAlerts is a popular MyBB plugin that introduces an alert system to notify users about relevant activities. Depending on the installed version and compatible extensions, members can receive notifications about events such as replies, mentions, and other interactions. This feature encourages users to return to your forum and participate in discussions. Before installation, check compatibility with your MyBB version....

How to Download XenForo Forum Software: A Step-by-Step Guide

Are you planning to create an online community where people can discuss topics, share ideas, and interact with one another? XenForo is a popular forum software that allows you to build a professional discussion platform with powerful community management features. In this guide, you will learn how to download XenForo forum software and prepare it for installation on your website. What Is XenForo Forum Software? XenForo is a commercial forum software designed to help website owners create online discussion communities. It offers features such as user profiles, private messaging, discussion threads, notifications, moderation tools, and mobile-friendly layouts. Whether you want to build a technology forum, entertainment community, or business discussion platform, XenForo provides tools to manage your members and discussions. How to Download XenForo Forum Software Follow these steps to obtain the software. Step 1: Visit the Official XenForo Website Open your browser and visit the ...

How to Modify an SMF Forum to Look Like Nairaland

Simple Machines Forum (SMF) is a free forum software that allows you to build an online discussion community. With the right modifications, you can transform its default appearance into a simple, text-focused forum resembling Nairaland. You do not need to build everything from scratch; most changes involve adjusting the theme, CSS, homepage layout, and forum settings. 1. Install SMF and Select a Theme First, install SMF on your web hosting account. Download it from the official website at https://www.simplemachines.org/. Log in to your administration panel and navigate to Admin → Configuration → Themes and Layout. Depending on your SMF version, the menu labels may differ. Choose a simple theme with a compact layout. Before making changes, back up your website files and database. 2. Customize the Theme's CSS To change your forum's appearance, open the stylesheet associated with your active theme. Depending on your SMF version, this may be named index.css or another CSS file insi...

Court Grants Abia Governorship Candidate Doris Ogala ₦30 Million Bail Over Cyberstalking Allegations

  A Federal High Court sitting in Lagos has granted Nollywood actress and African Action Congress (AAC) governorship candidate for Abia State, Doris Ogala, bail in the sum of ₦30 million over alleged cyberstalking and other offences involving Pastor Chris Okafor. Justice Akintayo Aluko granted the bail on Friday, November 6, 2026, following the hearing of her bail application. Under the conditions, Ogala is required to provide two sureties, each entering into a recognisance of ₦30 million. One of the sureties must either own a verifiable property in Lagos State or be a prominent national officer of her political party or a person of good reputation. The court also ordered Ogala to surrender her international passport to the court registrar pending the determination of the case. In addition, the judge restricted her from making electronic publications capable of exposing prosecution witnesses to harassment, threats, intimidation or public ridicule throughout the trial. The court's d...

Just In: Tinubu Criticizes Obi Over Erosion Challenges in Anambra

 JUST IN: President Bola Tinubu has criticised former Anambra State Governor Peter Obi and former Vice President Atiku Abubakar during a political rally in Uyo, Akwa Ibom State. Tinubu took a swipe at Obi over erosion challenges in Anambra, claiming that the former governor failed to tackle the problem before leaving office. “One governor (Peter Obi) claimed he is in one party they call NDC who is running for president. He ran away from erosion in Anambra State, he couldn’t confront erosion. “I, Bola Ahmed Tinubu, I confronted the Atlantic Ocean. I tamed it for you,” the President said. Tinubu also questioned Atiku’s political loyalty, criticising his departure from the Peoples Democratic Party (PDP) and subsequent political realignments. “They lack leadership and character. If a man (Atiku) that was once upon a time a baby of PDP became father later and because of a little inconvenience he ran away from that party and formed a dangerous camp in another party, is that a leadership ...

How to make money from instant Kash income program

Below are the major ways to earn money from instant kash income program. Daily QUIZ: You Can Earn #500 From Our Daily Quiz If You Win.. At This Daily Quiz Segment We Pay Participants That Do Their Best To Provide Good Answers #500 Each Or Reward Them With An INSTANT Recharge Card Of Their Choice Submitting Post: You Can Also Earn #100 For Every Of Your Posts That Get Approved On The Platform… Meaning If Ten Of Your Posts Get Approved Within A Day You Earn #1,000  Reading And Commenting On News: You Earn #3 Per Post You Read And Comment… You Are Expected To Read And Comment On At Least 34 Posts To Earn #102 Daily At INSTANT KASH platform Affiliate Earnings: With This Package You Can Earn 75% Of Every Persons Registration Fee You Introduce To Our Platform That’s Means If You Introduce 10 Of Your Friends And Family You Could Earn Yourself #15,000 Today And Withdraw Your Money Straight To Your Nigeria Bank Account. Daily Login: You Also Earn #50 For Your...

Meet The Most Dangerous Hacker in Human History, Pak Jin-hyok

 🚨 The Most Dangerous Hacker in Human History! The FBI Issues an International Arrest Warrant Against North Korea's Cyber Mastermind 🇰🇵💻 Imagine being accused of helping orchestrate cyberattacks that shook Hollywood, robbed one of the world's financial institutions, and brought hospitals across the globe to a standstill. Meet Pak Jin-hyok — the North Korean computer programmer wanted by the FBI. And here's what makes this story terrifying: U.S. authorities have linked him to a state-sponsored hacking conspiracy responsible for some of the most notorious cyber operations of the modern era. 🔥 THE CYBERATTACKS THAT PUT HIM ON THE FBI'S MOST-WANTED LIST: 🎬 1. SONY PICTURES HACK (2014) A devastating attack that exposed confidential corporate emails, employee information, and unreleased Hollywood films. The breach sent shockwaves through the entertainment industry. 🏦 2. THE $81 MILLION BANGLADESH BANK HEIST (2016) Hackers exploited the international banking system to s...