I've installed a theme (Chronicle) that's using timthumb for thumbnails.
It seems the thumbnails work fine if I add an image to a post, but without an image it shows an empty X box on the index page post.
The Thumbnail is called via this :
I've tried replacing the <?php echo $preview; ?> as some other help files have suggested but this over writes any other featured images I've uploaded on other posts.Code:<img class="ethumb" src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php echo $preview; ?>&h=100&w=290&zc=1" alt=""/>
I have seen a loop which seems to do what I want only when I try to use code or anything like this it throws a php error:
FYI: The image url above is one I've made up for this forum.Code:<?php $i = 0; while ( $q->have_posts() ) : $q->the_post(); $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); $image = $image[0]; if(empty($image)){ $image = 'http://www.mysite.com/wp-content/uploads/2011/XX/placeholder.jpg'; } ?>
I'd simply just like for a particular image to be used when and only when another image isn't uploaded. Does anyone know the best way to solve this ?


LinkBack URL
About LinkBacks
Reply With Quote




