Go to function.php file, Insert Below Code :
// Post thumbnail OR futured Image Set
add_theme_support( ‘post-thumbnails’ );
set_post_thumbnail_size(100, 100, true);
And add below code which you want show the future Image :
<?php the_post_thumbnail(); ?>
Additional Option :
Additional Option :
Go to function.php file, Insert Below Code :
add_image_size(
'loopThumb'
, 588, 125, true);
<?php the_post_thumbnail(
'loopThumb'
,
array
(
'class'
=>
'loopyThumbs'
)); ?>
OR
add_image_size(
'squareThumb'
, 125, 125, true);
OR
if
(function_exists(
'add_theme_support'
)) {
add_theme_support(
'post-thumbnails'
);
set_post_thumbnail_size(588, 250, true);
// Normal post thumbnails
add_image_size(
'loopThumb'
, 588, 125, true);
}
<?php add_theme_support(
'post-thumbnails'
,
array
(
'page'
)); ?>
And add below code which you want show the future Image :
<?php the_post_thumbnail(
'loopThumb'
); ?>
OR
<?php the_post_thumbnail(
'squareThumb'
); ?>
<?php the_post_thumbnail(
'loopThumb'
); ?>
<?php
if
(has_post_thumbnail()) {
the_post_thumbnail(
'loopThumb'
);
}
elseif
(get_post_meta(
$post
->ID,
"Thumbnail"
, true) !=
''
) { ?>
<img src=
"<?php echo get_post_meta($post->ID, "
Thumbnail
", true); ?>"
alt=
"<?php the_title(); ?>"
class
=
"attachment-loopThumb wp-post-image"
/>
<?php }
else
{
echo
'<img src="images/defaultThumbnail.png" alt="Default Post Image" />'
;
}
?>