Add Feature Image Support Function in your WordPress Theme

how to add feature image wordpress theme

Featured Images or Post Thumbnails is a theme feature. The majority of themes such as Genesis and also others support featured pictures by default. An easy means to find out whether your style assists showcased graphics is by going to the blog post editor. Just develop a brand-new article and scroll down a little to see if there is a meta box called feature image on the right hand side of the display.

You may have observed the “Featured Image” box when editing a post or page. It enables you to post or pick an associated picture for the short article. It generally appears as a thumbnail when seeing a list of posts, possibly in a classification index or search results page.

Feature image needs to be enabled within your theme. You can add it to a plug-in so it’s available to all themes but that may not be appropriate in every situation.

You can include feature image to your theme, If you are comfortable modifying theme data as well as understand your way around a little CSS, then you can do it on your own.
To add this function in your WordPress theme, you have to add this line of code in your theme’s functions.php (wp-content/themes/your-theme/)

This code will enable featured photo assistance for posts and also web pages. You can now visit posts or web pages, and you will see feature image choice allowed. Nevertheless, when you establish a featured photo it will not automatically present in your WordPress theme. To show featured photos in your theme, you need to modify your templates and include this line of code where you would like to present the featured image

or you can add like this

Advanced Feature Image Use

The above code is just basic way to add default feature image in your wordpress theme. you can create your own feature image function and set it to your own Feature Image Size which you want to display in your site.

I hope you will like this you can read more about feature image function from WordPress Site

Aly Chiman

Aly Chiman is a Blogger & Reporter at which covers a wide variety of topics from local news from digital world fashion and beauty . AlyChiTech covers the top notch content from the around the world covering a wide variety of topics. Aly is currently studying BS Mass Communication at University.