Created
May 22, 2013 10:49
-
-
Save rajvanshipradeep15/5626724 to your computer and use it in GitHub Desktop.
wordpress: using timthumb example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="span3 " id="<?php echo $post->ID; ?>"> | |
<div class="" style="margin-left:0px;"> | |
<h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> | |
<div class="postimg" id="img_<?php echo $post->ID; ?>"> | |
<?php | |
if(has_post_thumbnail()) { ?> | |
<?php //echo get_the_post_thumbnail($post->ID, array(255,90)); ?> | |
<img src="<?php bloginfo('template_directory'); ?>/wp-content/themes/mytheme1/timthumb.php?src=<?php echo get_image_url(); ?>&h=90&w=255&zc=1" alt="<?php the_title(); ?>"/> | |
<?php } else { | |
echo '<img src="'.get_bloginfo("template_url").'/images/nothumb.jpg" alt="No Thumbnail"/>'; | |
}?> | |
</div> | |
<div class="" id="content_<?php echo $post->ID ?>"> | |
<?php echo truncateWords($post->post_content)."..."; ?> | |
</div> | |
</div><!--span12--> | |
</div><!--span4--> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment