How to get posts that is between today and last month? WordPress Issue

For example, today is 25 January 2016, i want to get the posts that are published between TODAY with year 2015, month December, day 25.

It seems simple, but there are issues where the month ends with 30,31, 28, etc. Not to mention i have to manually count whether it is January (because if it’s january, i have to reduce the year by 1, current_year – 1).

Read More

Anyone have a good solution for the WP_Query to achieve this?

Related posts

1 comment

Comments are closed.