- <?php
- function filter_where($where = '') {
- //posts in the last 30 days
- $where .= " AND post_date > '" . date('Y-m-d', strtotime('-30 days')) . "'";
- return $where;
- }
- add_filter('posts_where', 'filter_where');
- query_posts("showposts=10&v_sortby=views&caller_get_posts=1&orderby=date&order=desc") ?>
-
- <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
- " title="<?php the_title() ?>"><?php the_title() ?>
- <?php endwhile; endif; ?>
-
复制代码 这是最热文章代码,放在topbar.php页面就可以了。 |