I have to display the posts as the following
September 2010
Friday September 24, 2010
post1
post2
.
.
.
Friday September 17, 2010
post1
post2
.
.
.
Friday September 10, 2010
post1
post2
.
.
.
Friday September 03, 2010
post1
post2
.
.
.
can any one tell, how can do this?, or which function should i use?
I have used the following function and i got all the post in current month
query_posts("year=$current_year&monthnum=$current_month")
How can i show the posts per week of this month?
is it work query_posts(""year=$current_year&monthnum=$current_month&post_date >$startDate&post_date <=$endDate")
Or what is another good way?
You’ll need to add a condition to the
posts_where
filter in wordpress. I have an example here for only pulling posts that are from the current post’s date and earlier:Add this to functions.php
Use this, or similar wherever it is that you are running your query:
You’ll obviously need to modify this to add the date boundaries that you need.