Calling timthumb image url for featured image in wordpress

  • 0

Include timthumb.php file in theme directory.
Instead of post thumbnail image calling add following code:

<?php if ( has_post_thumbnail() ) {

$thumb_id = get_post_thumbnail_id();

$thumb_url = wp_get_attachment_image_src($thumb_id,’thumbnail-size’, true); ?>
<a href=”<?php the_permalink(); ?>” ><img src=”<?php bloginfo(‘template_directory’)?>/timthumb.php?src=<?php echo $thumb_url[‘0’]; ?>&q=100&h=125&w=230″ alt=”” /></a>
}

Include timthumb.php file in theme directory. Instead of post thumbnail image calling add following code: <?php if ( has_post_thumbnail() ) { $thumb_id = get_post_thumbnail_id(); $thumb_url = wp_get_attachment_image_src($thumb_id,’thumbnail-size’, true); ?> <a href=”<?php the_permalink(); ?>” ><img src=”<?php bloginfo(‘template_directory’)?>/timthumb.php?src=<?php echo $thumb_url[‘0’]; ?>&q=100&h=125&w=230″ alt=”” /></a> }

Include timthumb.php file in theme directory. Instead of post thumbnail image calling add following code: <?php if ( has_post_thumbnail() ) { $thumb_id = get_post_thumbnail_id(); $thumb_url = wp_get_attachment_image_src($thumb_id,’thumbnail-size’, true); ?> <a href=”<?php the_permalink(); ?>” ><img src=”<?php bloginfo(‘template_directory’)?>/timthumb.php?src=<?php echo $thumb_url[‘0’]; ?>&q=100&h=125&w=230″ alt=”” /></a> }