Skip to main content
replaced http://wordpress.stackexchange.com/ with https://wordpress.stackexchange.com/
Source Link

Thanks to AmbitiousAmoebaAmbitiousAmoeba for the answer. The following improved code solves the problem:

function filter_where( $where = '' ) {
   global $wpdb;

   $where .= " AND (($wpdb->postmeta.meta_key = 'original_date' AND $wpdb->postmeta.meta_value >= '2000-01-01') AND ($wpdb->postmeta.meta_key = 'original_date' AND $wpdb->postmeta.meta_value <= '2004-12-31')) ";
   return where;
}
add_filter('posts_where', 'filter_where');
query_posts($query_string);
while (have_posts()) :
   the_post();
   the_content();
endwhile;

Thanks to AmbitiousAmoeba for the answer. The following improved code solves the problem:

function filter_where( $where = '' ) {
   global $wpdb;

   $where .= " AND (($wpdb->postmeta.meta_key = 'original_date' AND $wpdb->postmeta.meta_value >= '2000-01-01') AND ($wpdb->postmeta.meta_key = 'original_date' AND $wpdb->postmeta.meta_value <= '2004-12-31')) ";
   return where;
}
add_filter('posts_where', 'filter_where');
query_posts($query_string);
while (have_posts()) :
   the_post();
   the_content();
endwhile;

Thanks to AmbitiousAmoeba for the answer. The following improved code solves the problem:

function filter_where( $where = '' ) {
   global $wpdb;

   $where .= " AND (($wpdb->postmeta.meta_key = 'original_date' AND $wpdb->postmeta.meta_value >= '2000-01-01') AND ($wpdb->postmeta.meta_key = 'original_date' AND $wpdb->postmeta.meta_value <= '2004-12-31')) ";
   return where;
}
add_filter('posts_where', 'filter_where');
query_posts($query_string);
while (have_posts()) :
   the_post();
   the_content();
endwhile;

Thanks to AmbitiousAmoeba for the answer. The following improved code solves the problem:

function filter_where( $where = '' ) {
   global $wpdb;

   $where .= " AND (($wpdb->postmeta.meta_key = 'original_date' AND $wpdb->postmeta.meta_value >= '2000-01-01') AND ($wpdb->postmeta.meta_key = 'original_date' AND $wpdb->postmeta.meta_value <= '2004-12-31')) ";
   return where;
}
add_filter('posts_where', 'filter_where');
query_posts($query_string);
while (have_posts()) :
   the_post();
   the_content();
endwhile;

Thanks to AmbitiousAmoeba for the answer. The following improved code solves the problem:

function filter_where( $where = '' ) {
   $where .= " AND (($wpdb->postmeta.meta_key = 'original_date' AND $wpdb->postmeta.meta_value >= '2000-01-01') AND ($wpdb->postmeta.meta_key = 'original_date' AND $wpdb->postmeta.meta_value <= '2004-12-31')) ";
   return where;
}
add_filter('posts_where', 'filter_where');
query_posts($query_string);
while (have_posts()) :
   the_post();
   the_content();
endwhile;

Thanks to AmbitiousAmoeba for the answer. The following improved code solves the problem:

function filter_where( $where = '' ) {
   global $wpdb;

   $where .= " AND (($wpdb->postmeta.meta_key = 'original_date' AND $wpdb->postmeta.meta_value >= '2000-01-01') AND ($wpdb->postmeta.meta_key = 'original_date' AND $wpdb->postmeta.meta_value <= '2004-12-31')) ";
   return where;
}
add_filter('posts_where', 'filter_where');
query_posts($query_string);
while (have_posts()) :
   the_post();
   the_content();
endwhile;
Source Link

Thanks to AmbitiousAmoeba for the answer. The following improved code solves the problem:

function filter_where( $where = '' ) {
   $where .= " AND (($wpdb->postmeta.meta_key = 'original_date' AND $wpdb->postmeta.meta_value >= '2000-01-01') AND ($wpdb->postmeta.meta_key = 'original_date' AND $wpdb->postmeta.meta_value <= '2004-12-31')) ";
   return where;
}
add_filter('posts_where', 'filter_where');
query_posts($query_string);
while (have_posts()) :
   the_post();
   the_content();
endwhile;