Sakamoto Kazuma
Sakamoto Kazuma

Reputation: 2579

Wordpress Date Post

I need to get all the posts on a certain date, and then parse the post content. How would I grab the posts by specifying a specific date? I'm assuming I need to use the get_posts() function, but I'm not clear as to how to format that call.

Upvotes: 1

Views: 140

Answers (1)

Michael
Michael

Reputation: 507

Return posts for today

$today = getdate();
$myposts=get_posts('year=' .$today["year"] .'&monthnum=' .$today["mon"] .'&day=' .$today["mday"] );

More examples: Time Parmeters for query_posts or get_posts

Upvotes: 2

Related Questions