Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to display a meta field between two dates, the admin can set the two dates via the custom fields.

How can i make such content show between the dates set?

Thanks Matt

share|improve this question

1 Answer 1

function filter_where($where = '') {
$where .= " AND post_date >= '1980-05-11' AND post_date <= '2011-05-11'"; return $where; }
add_filter('posts_where', 'filter_where');
query_posts($query_string);
while (have_posts()) :
the_post();
the_content();
endwhile;
?>

get meta data value and replace with the numeric date.

share|improve this answer
    
Hey, Thanks for the help but the code will display the posts content on the certain dates, i want to display only a certain part in the post. Is this possible? –  Shoebox Oct 17 '11 at 3:35
    
can you clear the question a little bit more?? –  Monirul Islam Oct 20 '11 at 6:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.