Display “Future Posts” Solutions
-
There are some topics about this subject, some good solutions, but I still need some help to completely solve it…
-
I found 3 ways to display future posts:
-
1) Hacking the query.php file:
http://ww.wp.xz.cn/support/topic/141099?replies=2I don´t like this solution, because you change the wp core for everything you post after that (could you keep scheduling posts?)
-
2) Install “The Future is Now” plugin
The plugin changes the status of your future posts to “published”, so every post will be displayed.
-
The problem:
If you have a events page, you probably don´t want to display the past posts (events), so you have to filter that on your query. There is a topic discussing about that, with a good code by disbas to check the date and post just the future posts:
http://ww.wp.xz.cn/support/topic/181245?replies=27I tried this solution and it´s almost perfect… the point is: the filter is created after the query so, although the past posts doesn´t be displayed, they are considered by the loop, so an exemple: if you have configured the WP to show 10 posts in your page, and have 7 past posts now, the page will show just 3 posts instead 10, and then paginate it for the next 10…
I could´n find a solution for that, any help would be great!
-
3) Don´t install “The Furure is Now” plugin, and change the query inside the pages to display just the future posts (post_status=future):
http://ww.wp.xz.cn/support/topic/163145?replies=7
- I think it should be the best solution (for me!), since I didn´t to change the WP core, install plugins… but still have some point: In my case, I want to limit the posts displayed by a future date, like a “weekly events calendar”. So I still need to use some “date check” filter, like the solution 2. It means I still have the problem with pagination, not on the beginning, but on the end of the posts. The “pagination system” will consider my “very future” posts and create a blank page, after my post limit. It´s not a big deal, but I think it could be solved, right?
So, that´s it. I tried to compile the subject here, to get the life of the searchers easiest! And, of course, to find answers to my questions! 😉
Thanks everybody and I´m sorry about my poor english!
-
1) Hacking the query.php file:
The topic ‘Display “Future Posts” Solutions’ is closed to new replies.