Support » Themes and Templates » Display popular post of last 15 days

  • Using a Theme Junkie theme Freshlife at my blog and in the sidebar there is a default option to show all time popular post, but I wanted to show popular post of last 30 days.

    I have extracted these code as below and you might help what should be change to show the last 30 days popular post.

    // Tabber: Get Most Popular Posts
    function tj_tabs_popular( $posts = 5, $size = 35 ) {
    	$popular = new WP_Query('orderby=comment_count&posts_per_page='.$posts);
    	while ($popular->have_posts()) : $popular->the_post();
     	<?php tj_show_thumb($size, $size); ?>
     	<div class="info">
     	<a>" href="<?php the_permalink() ?>"><?php the_title(); ?></a>
     	<span class="meta"><?php comments_popup_link('0 Comment', '1 Comment', '% Comments', 'comments-link', ''); ?></span>
    	</div> <!--end .info-->
    	<div class="clear"></div>
    <?php endwhile;


Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Display popular post of last 15 days’ is closed to new replies.