Add featured image support to any theme in Wordpress

Just Write The below  Code In Your functions.php

<?php


add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 80, 55, true ); // W x H, hard crop


?>

To Access the image Posted In Your Post Or Pages Write The Following Code In your Loop 


if ( has_post_thumbnail() ) {
 // the current post has a thumbnail
 the_post_thumbnail();
 }



1 comment: