<!-- Articles // -->
<div class="ftop">
<div class="featured">
<div class="fthumbs">
<?php $i = 0; $featured = new WP_Query("cat=".get_wpn_config('featured_category_id')."&showposts=5"); while($featured->have_posts()) : $featured->the_post();?>
<a href="
<?php the_permalink
(); ?>" title="
<?php the_title_attribute
(); ?>"><img src="
<?php echo get_post_meta
($post->ID, "thumbnail", true); ?>" alt=""
<?php if($i == 0
) echo 'class="active" '; ?>/></a><br />
<?php $i++; endwhile; $i = 0; ?>
</div>
<div class="fwrap">
<ul>
<?php $featured = new WP_Query("cat=".get_wpn_config('featured_category_id')."&showposts=5"); while($featured->have_posts()) : $featured->the_post();?>
<li>
<a href="
<?php the_permalink
(); ?>" title="
<?php the_title_attribute
(); ?>"><img src="
<?php echo get_post_meta
($post->ID, "featured_thumbnail", true); ?>" width="200" height="50" />
<div>
<a class="title" href="<?php the_permalink(); ?>"><?php the_title(); ?></a><br />
<?php wpn_content_limit(get_the_content(),140); ?>
<a href="<?php the_permalink(); ?>">more</a>
</div>
</li>
<?php endwhile; ?>
</ul>
</div>
</div>
<div class="top">
<span class="heading1"><span>Articles</span></span>
<ul>
<?php
$sql = "
SELECT *
FROM $wpdb->posts
WHERE post_date_gmt > ".(time()-strtotime('-2 weeks'))." AND post_type = 'post' ORDER BY comment_count DESC LIMIT 5
";
$top_posts = $wpdb->get_results($sql);
foreach ($top_posts as $post) {
?>
<li><a href="
<?php the_permalink
(); ?>">
<?php the_title
(); ?></a><span><a class="comments" href="
<?php the_permalink
(); ?>#comments">
<?php echo $post->comment_count; ?> Comments</a>Posted Under:
<?php the_category
(', '); ?></span></li>
<?
}
?>
</ul>
</div>
<div class="clear"></div>
</div>
<!-- // Articles -->