0

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

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

get meta data value and replace with the numeric date.

  • 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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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