Title: pepperama's Replies | WordPress.org

---

# pepperama

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

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

 Search replies:

## Forum Replies Created

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

 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Woothemes Popular Tab](https://wordpress.org/support/topic/woothemes-popular-tab/)
 *  Thread Starter [pepperama](https://wordpress.org/support/users/pepperama/)
 * (@pepperama)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/woothemes-popular-tab/#post-1286153)
 * I have checked. This is the code from the “Popular” function –
 * <?php
    $pop_posts = get_option(‘woo_popular_posts’); if (empty($pop_posts) ||
   $pop_posts < 1) $pop_posts = 8; $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”)-24,
   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 “.
   $pop_posts; $posts = $wpdb->get_results($popularposts); $popular = ”; if($posts){
   foreach($posts as $post){ $post_title = stripslashes($post->post_title); $guid
   = get_permalink($post->ID);
 *  $custom_field = get_post_meta($post->ID, “image”, true);
    ?>
    -  <?php if($custom_field) { ?>
       ” href=”<?php echo $guid; ?>”><img src=”<?php
      echo bloginfo(‘template_url’); ?>/thumb.php?src=<?php echo $custom_field; ?
      >&h=35&w=35&zc=1&q=95″ alt=”<?php echo $post_title; ?>” class=”thumbnail” /
      >
      
       <?php } ?>
    - 
       <div style=”clear:both”></div>
    - <?php
       } } ?>
    - Does this shed any light?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Parent / Child Pages Not Appearing](https://wordpress.org/support/topic/parent-child-pages-not-appearing-1/)
 *  Thread Starter [pepperama](https://wordpress.org/support/users/pepperama/)
 * (@pepperama)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/parent-child-pages-not-appearing-1/#post-1250330)
 * under the “about EKFC” page.

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