Default Image
-
How I can display a default image if no images is set?
Thanks,
natspace<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'grid_6' ); ?> <?php if( $image ) : ?> <div class="scroller-image" style="padding-top:5px;"> <?php echo "<img style='float: left; margin-right: 5px;' src='"; bloginfo('template_url'); echo "/timthumb.php?src=".$image[0]."&h=84&w=84&zc=1' />"; ?> </div><!-- .scroller-image (end) --> <?php endif; ?> <?php endif; ?>
The topic ‘Default Image’ is closed to new replies.