Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aristath/6123459 to your computer and use it in GitHub Desktop.
Save aristath/6123459 to your computer and use it in GitHub Desktop.
<div class="span5 cf-image">
<?php
if(has_post_thumbnail()){
$imageurl = wp_get_attachment_image_src(get_the_post_thumbnail($post->ID, 'medium' ));
$thumbnail = '<img title="no image" alt="no image" class="cf-no-image wp-post-image" src="' . $imageurl . '">';
} else {
$thumbnail = '<img width="300" height="300" title="no image" alt="no image" class="cf-no-image wp-post-image" src="' . $field_image . ' rel=lightbox[<?php echo $post->ID; ?>]">';
}
?>
<?php echo $thumbnail; ?>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment