I need to add some custom submenu links to the Posts menu in WordPress admin so content managers can click on a link and get a list of posts from today, yesterday or this month. The default date filter in the WordPress back end filters posts by month only. When you select that filter it produces a URL like
http:// ..... /wp-admin/edit.php?s&post_status=all&post_type=post&action=-1&m=201301&cat=0&post_format=0&paged=1&mode=list
where m is the current month, so 201301 = January 2013. Is it possible to pass edit.php a date in some other format, i.e. a date range? If not, can anyone suggest the best way to generate a list of posts from the last month on the manage posts page?
WordPress support advised me you can use the same parameters on the URL as WP_Query() accepts.
http://codex.wordpress.org/Class_Reference/WP_Query#Time_Parameters
You can’t pass a date range. The best you can do is pass specific dates.
For example, edit.php?s&post_status=all&post_type=post&action=-1&m=201301&cat=0&post_format=0&paged=1&mode=list&day=1 will show all posts from the 1st day of the current month.
When I told this to our content manager he was happy just to have a link to a list of posts from yesterday. In case useful to anybody, here’s what I’m doing: