Display popular post of last 15 days (2 posts)

  1. Robinsh
    Posted 4 years ago #

    Using a Theme Junkie theme Freshlife at my blog http://www.digmlm.com 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;


  2. ibadullah
    Posted 4 years ago #

    Do you use any instant messaging?

Topic Closed

This topic has been closed to new replies.

About this Topic