Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- global $post;
- function filter_where($where = '') {
- $where .= " AND post_date > '" . date('Y-m-d', strtotime('-30 days')) . "'";
- return $where;}
- add_filter('posts_where', 'filter_where');
- query_posts('post_type=post&posts_per_page=5&orderby=comment_count&order=DESC);
- while (have_posts()): the_post();
- $thumb = get_the_post_thumbnail($post->ID,array(100,60), true);?>
- <div class="relatedpost">
- <div class="thumb"><?php echo $thumb; ?></div>
- <div class="rtitle"><a href="<?php the_permalink(); ?>"title="<?php the_title(); ?>"><?php the_title(); ?></a></div>
- </div>
- <?php
- endwhile;
- wp_reset_query();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement