FEATURED POSTS WITH THUMB NAILS


/ Published in: PHP
Save to your folder(s)

VIA KRISTERELLA


Copy this code and paste it in your HTML
  1. function custom_featured_posts() {
  2. if (is_page(heathgrange))
  3. {
  4. $custom_loop = new WP_Query('showposts=50&category_name=heath-grange');
  5. if ( $custom_loop->have_posts() ) :
  6. echo '<p class="alert" style="clear:both;"><span class="pb">Take a look at the blog posts for this site</span> and see it take shape from the comfort of your home.<br />You can easily <a href="http://eepurl.com/Es0x">subscribe to receive weekly updates here</a>.</p>';
  7. echo '<ul class="featured_posts">';
  8. while ( $custom_loop->have_posts() ) : $custom_loop->the_post();
  9.  
  10. $post_image = thesis_post_image_info('thumb');
  11. echo '<li class="featured_posts">' . $post_image['output'] . ' <a title="go to article" href="' . get_permalink() . '">' . get_the_title() . '</a><p>' . get_the_excerpt() . ' <a title="go to article" href="' . get_permalink() . '" rel="nofollow" style="font-size: 0.85em;">[more]</a></p></li>';
  12.  
  13. endwhile;
  14. wp_reset_query();
  15. echo '</ul>';
  16. endif;
  17. }
  18. }add_action('thesis_hook_after_post','custom_featured_posts');

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.