Revision: 39648
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at January 19, 2011 14:59 by pirazo
Initial Code
<?php $recent = new WP_Query("category_name=blog,news&showposts=3"); while($recent->have_posts()) : $recent->the_post();?> <div class="hmpg-blog-post"> <div class="hmpg-blog-postimage"> <?php if (function_exists('has_post_thumbnail')) { if ( has_post_thumbnail() ) { ?> <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( array(100,100 )); ?></a> <?php } else { ?> <a href="<?php the_permalink(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/hmpg-blog-thumb.jpg" width="100px" height="100px" border="0" alt="<?php bloginfo('name'); ?>" /></a> <?php } } ?> </div><!-- hmpg-blog-postimage --> <h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2> <?php the_content_limit(160, "Read more"); ?> </div><!-- hmpg-blog-post --> <?php endwhile; ?>
Initial URL
Initial Description
No plugin necessary, uses "loop" and default WP Thumnail
Initial Title
Recent Posts Loop with WP Thumbnail
Initial Tags
Initial Language
PHP