Re: Featured Image not appearing

Hot WordPress Themes Support Forum WordPress Themes Sportal Featured Image not appearing Re: Featured Image not appearing

#1814
milos
Moderator

Hello,

This old theme doesn’t support featured images, but you can add this feature easily if you follow this http://codex.wordpress.org/Post_Thumbnails

So, you should add this line in functions.php

Code:
add_theme_support( ‘post-thumbnails’ );

Then, you can add this code anywhere you like featured images to appear.

In example, you can add this code in file main.php:

Code:
if ( has_post_thumbnail() ) {
the_post_thumbnail();
}

In example, you can add this code in file main.php above line

Code:
get_template_part( ‘content’, ‘single’ );

to show it on single pages or above line:

Code:
get_template_part( ‘content’, get_post_format() );

to show it on other pages.

Thanks