<?php get_header(); ?> <?php $urlHome = get_bloginfo('template_directory'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="box post" id="post-<?php the_ID(); ?>"> <div class="content"> <?php $postimageurl = get_post_meta($post->ID, 'post-img', true); if ($postimageurl) { ?> <div class="pic fl"><img src="<?php echo $postimageurl; ?>" alt="Post Pic" width="200" height="200" /></div> <?php } ?> <div class="post-title"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> </div> <!--/post-title --> <div class="post-date"><em>On <?php the_time('m.d.y') ?>, In <?php the_category(', ') ?>, by <?php the_author_posts_link(); ?></em></div> <div class="post-excerpt"><?php the_excerpt(); ?></div> <!--/post-excerpt --> <?php the_content('<p class="serif">Read the rest of this page »</p>'); ?> </div> <!--/content --> <div class="hl"></div> <div class="content"> <div class="pic fl"><?php echo get_avatar(get_the_author_email(), $size = '80', $default = $urlHome . '/images/default_avatar_author.gif' ); ?></div> <div class="post-author"> <div class="author-descr"> <h3><?php the_author(); ?></h3> <p><?php the_author_description(); ?></p> <div class="author-details"><a href="<?php the_author_url(); ?>" target="_blank">Visit Authors Website</a> | <a href="<?php bloginfo('url'); ?>/author/<?php echo strtolower(get_the_author_nickname()); ?>">All Articles From This Author</a></div> </div> <!--/author-descr --> <br class="fix" /> </div> <!--/post-author --> </div> <!--/content --> <div class="hl"></div> <div class="social-links"> <div class="fl">If you enjoyed this article, please consider sharing it!</div> <div class="fr"><a href="http://del.icio.us/post?url=<?php the_permalink() ?>&title=<?php the_title(); ?>" title="Bookmark at Delicious" rel="nofollow" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/ico-soc1.gif" alt="Icon" /></a> <a href="http://www.mixx.com/submit?page_url=<?php the_permalink() ?>" title="Bookmark at Mixx" rel="nofollow" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/ico-soc2.gif" alt="Icon" /></a> <a href="http://www.stumbleupon.com/submit?url=<?php the_permalink() ?>&title=<?php the_title(); ?>" title="Bookmark at StumbleUpon" rel="nofollow" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/ico-soc3.gif" alt="" /></a> <a href="http://digg.com/submit?phase=2&url=<?php the_permalink() ?>&title=<?php the_title(); ?>" title="Bookmark at Digg" rel="nofollow" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/ico-soc4.gif" alt="Icon" /></a> </div> <br class="fix" /> </div> <!--/social-links --> </div> <!--/box --> <div class="box post-rel"> <div class="content"> <div class="subcols"> <div class="col1"> <h2>Related Posts</h2> <?php $results = $wpdb->get_results(yarpp_sql(array('post'),array())); foreach ( (array) $results as $_post ) : ?> <div class="th fl"><a href="<?php echo get_permalink($_post->ID); ?>"><img src="<?php echo get_post_meta($_post->ID, 'post-img', true); ?>" alt="" /></a></div> <div><a href="<?php echo get_permalink($_post->ID); ?>"><?php echo $_post->post_title; ?></a></div> <div class="hl2"></div> <?php endforeach; ?> </div> <!--/col1 --> <div class="col2"> <h2>Popular Posts</h2> <?php foreach ( (array) convergence_popular_posts() as $_post ) : ?> <div class="th fl"><a href="<?php echo get_permalink($_post->ID); ?>"><img src="<?php echo get_post_meta($_post->ID, 'post-img', true); ?>" alt="" /></a></div> <div><a href="<?php echo get_permalink($_post->ID); ?>"><?php echo $_post->post_title; ?></a></div> <div class="hl2"></div> <?php endforeach; ?> </div> <!--/col1 --> <br class="fix" /> </div> <!--/subcols --> </div> <!--/content --> </div> <!--/box --> <?php comments_template(); ?> <?php endwhile; else: ?> <p>Sorry, no posts matched your criteria.</p> <?php endif; ?> <?php get_sidebar() ;?> <?php get_footer(); ?>