2つの特定の日付の間に公開された投稿を一覧表示したいだけです
私はここで解決策を見つけましたhttp://www.wprecipes.com/wordpress-loop-get-posts-published-between-two-particular-dates
そして私のコードはここにあります、残念ながらこれは機能していません!!
<?php
function filter_where($where = '') {
$where .= " AND post_date >= '2012-05-09' AND post_date <= '2012-05-11'";
//$where .= " AND post_date > '" . date('Y-m-d', strtotime('-30 days')) . "'";
return $where;
}
add_filter('posts_where', 'filter_where');
query_posts($query_string);
?>
<?php while (have_posts()) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<?php endwhile; ?>