How to enable Featured Image for WordPress Pages

H
Published in: Wordpress

By default wordpress has feature image option for wordpress posts. Some themes support many other option which vary with the theme. Featured image help the wordpress theme to display image as a header image or post main image or thumbnail image.

When you develop a custom wordpress theme then you need a feature image option foe your theme so you can use the code given below to enable a featured image option for wordpress pages.

Featured Image for WordPress Pages

To enable the featured image in wordpress page follow the steps given below

  • Login to your wordpress website.
  • Goto Appearance  then Editor
  • From the right side select Functions (function.php) file
  • Place the php function given below
  • Save the changes and go to the page and you will see Featured Image Option.
 add_theme_support( 'post-thumbnails', array( 'post', 'page' ) );
enable Featured Image for WordPress Pages
.

Remember: You need to add CPT(Custom Post types) in the function code to display featured image on them because using custom function you need to update it as per your desire. The function will not work with every theme until you place the php function that will fetch the featured image on dresire location when you upload the image.

Published in: Wordpress

Search

Looking for something? Search here!
S

Meet the Author

Web Geek, Tech Columnist
A
Sarmad Gardezi

Sarmad Gardezi is a Google Developer Expert in GSuite and Google Apps Script. He is doing an engineering degree in Software Engineering, and is the professional blogger from islamabad, Pakistan. Read more on Lifehacker and YourStory

Get in touch

About Me

I cover all the aspects of digital marketing. You will find free content around Blogging, SEO, WordPress, Web-hosting and making money online.