Title: deepak1990's Replies | WordPress.org

---

# deepak1990

  [  ](https://wordpress.org/support/users/deepak1990/)

 *   [Profile](https://wordpress.org/support/users/deepak1990/)
 *   [Topics Started](https://wordpress.org/support/users/deepak1990/topics/)
 *   [Replies Created](https://wordpress.org/support/users/deepak1990/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/deepak1990/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/deepak1990/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/deepak1990/engagements/)
 *   [Favorites](https://wordpress.org/support/users/deepak1990/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [WordPress Feed showing old posts. Using autoblogged](https://wordpress.org/support/topic/wordpress-feed-showing-old-posts-using-autoblogged/)
 *  Thread Starter [deepak1990](https://wordpress.org/support/users/deepak1990/)
 * (@deepak1990)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/wordpress-feed-showing-old-posts-using-autoblogged/#post-1420119)
 * Oh Thanks esmi but i have resolved the problem.
 * I use gazette theme.
    This script makes use of the number of comments in any 
   popular post and displays it first. How can i modify this script to show recent
   posts instead of popular posts?
 * popular.php
 *     ```
       <?php
       $now = gmdate("Y-m-d H:i:s",time());
       $lastmonth = gmdate("Y-m-d H:i:s",gmmktime(date("H"), date("i"), date("s"), date("m")-12,date("d"),date("Y")));
       $popularposts = "SELECT ID, post_title, COUNT($wpdb->comments.comment_post_ID) AS 'stammy' FROM $wpdb->posts, $wpdb->comments WHERE comment_approved = '1' AND $wpdb->posts.ID=$wpdb->comments.comment_post_ID AND post_status = 'publish' AND post_date < '$now' AND post_date > '$lastmonth' AND comment_status = 'open' GROUP BY $wpdb->comments.comment_post_ID ORDER BY stammy DESC LIMIT 10";
       $posts = $wpdb->get_results($popularposts);
       $popular = '';
       if($posts){
       foreach($posts as $post){
       $post_title = stripslashes($post->post_title);
       $guid = get_permalink($post->ID);
       $popular .= '<li><a href="'.$guid.'" title="'.$post_title.'">'.$post_title.'</a></li>';
       }
       }echo $popular;
       ?>
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [ASC and DESC](https://wordpress.org/support/topic/asc-and-desc/)
 *  [deepak1990](https://wordpress.org/support/users/deepak1990/)
 * (@deepak1990)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/asc-and-desc/#post-1295030)
 * Hello, whoa change the post to –
 * <?php query_posts($query_string . ‘&orderby=date&order=ASC’); ?>
    <?php if (have_posts()):
   while (have_posts()) : the_post();?>
 * or
 * <?php query_posts($query_string . ‘&orderby=date&order=ASC’); ?>
    <?php while(
   have_posts()) : the_post(); ?>
 * You need ascending not descending..LOLS does it work ?
 * Try Both see which works for you.

Viewing 2 replies - 1 through 2 (of 2 total)