No Future Posts
Diese Plugin ändert den Post Status von “future” auf “publish”.
Warum? Normalerweise werden Einträge, die in der Zukunft liegen von Wordpress ausgefiltert. Das hat den Vorteil, dass man Beiträge schreiben kann, die automatisch erst zu einem gewählten späteren Zeitpunkt veröffentlicht werden. Nachteil des Ganzen ist aber, dass man keine Termine einblenden kann. Durch mein Plugin werden nun auch vordatierte Beiträge ganz normal angezeigt.
Ausnahmen (Status bleibt “future”) können per Artikel oder per Kategorie angegeben werden.
Momentane Probleme:
- Die Post-Anzahl in der Kategorieliste ignoriert diese Manipulation da sie einen eigenen Filter nach post-datum benutzt. Aber die Zahlen kann man ja ausblenden.
- Um die Posts auch im Kalender(-Widget) anzuzeigen muss man an die Core-Dateien da auch hier eine eigene Abfrage benutzt wird. Siehe Patch unten.
Calendar Patch:
To show the future posts in the calendar widget too you have to edit wp-includes/general-template.php about row 1077 (Wordpress 2.9.2).
Look for
$dayswithposts = $wpdb->get_results("SELECT DISTINCT DAYOFMONTH(post_date)
FROM $wpdb->posts WHERE MONTH(post_date) = '$thismonth'
AND YEAR(post_date) = '$thisyear'
AND post_type = 'post' AND post_status = 'publish'
AND post_date < '" . current_time('mysql') . '\'', ARRAY_N);
and change to
$dayswithposts = $wpdb->get_results("SELECT DISTINCT DAYOFMONTH(post_date)
FROM $wpdb->posts WHERE MONTH(post_date) = '$thismonth'
AND YEAR(post_date) = '$thisyear'
AND post_type = 'post' AND post_status = 'publish' ", ARRAY_N);
No Future Posts 1.2.1
Contributors: Tom BraiderDonate link: http://www.unicef.org
Tags: posts, future, events
Requires at least: 2.0
Tested up to: 2.8
Stable tag: 1.2.1
Changes the post status from "future" to "publish".
Description
Changes the status of all posts from "future" to "publish".
So future posts will show in your blog like other posts.
I use it to show events. No calendar plugin is needed.
Exclude liste for posts and categories.
Installation
- unzip plugin directory into the
/wp-content/plugins/directory - activate the plugin through the
Pluginsmenu in WordPress - fill the exclude lists on options page
Frequently Asked Questions
Need Help? Find Bug?
read and write comments on plugin page
Screenshots
Arbitrary section
Known Issues
- post counter in the category list ignores future posts because it is using the post_date
- plugin "Customizable Post Listings" must change because it is using it own sql-query
Changelog
1.2.1
- new translation: russian, thanks Marcis Gasuns http://www.fatcow.com
1.2
- new: uninstall function for wp 2.7
1.1
- new: exclude lists for posts and categories
- new: languages english, german
1.0
- first release
created by Readme Parser
$dayswithposts = $wpdb->get_results(“SELECT DISTINCT DAYOFMONTH(post_date)
FROM $wpdb->posts WHERE MONTH(post_date) = ‘$thismonth’
AND YEAR(post_date) = ‘$thisyear’
AND post_type = ‘post’ AND post_status = ‘publish’
AND post_date < ‘” . current_time(‘mysql’) . ‘\”, ARRAY_N);
FROM $wpdb->posts WHERE MONTH(post_date) = ‘$thismonth’
AND YEAR(post_date) = ‘$thisyear’
AND post_type = ‘post’ AND post_status = ‘publish’
AND post_date < ‘” . current_time(‘mysql’) . ‘\”, ARRAY_N);
![de [de]](http://www.tomsdimension.de/wp/wp-content/plugins/translate-with-google/img/de.png)
![en [en]](http://www.tomsdimension.de/wp/wp-content/plugins/translate-with-google/img/en.png)
![fr [fr]](http://www.tomsdimension.de/wp/wp-content/plugins/translate-with-google/img/fr.png)
![es [es]](http://www.tomsdimension.de/wp/wp-content/plugins/translate-with-google/img/es.png)
![it [it]](http://www.tomsdimension.de/wp/wp-content/plugins/translate-with-google/img/it.png)
![pt [pt]](http://www.tomsdimension.de/wp/wp-content/plugins/translate-with-google/img/pt.png)
![ru [ru]](http://www.tomsdimension.de/wp/wp-content/plugins/translate-with-google/img/ru.png)
![ko [ko]](http://www.tomsdimension.de/wp/wp-content/plugins/translate-with-google/img/ko.png)
RSS Artikel

hi. Thanks for plugin
perfect.
Regards
I have an event site and love this plugin but is there anyway to reverse it so that the dates/posts are in chronological order?
Hello tru,
the post order is made by wordpress not by the plugin. Maybe the “query-posts” tag can help you. Sorry, it’s german.
TOM!
Still loving your plugin. I have another challenge for you, though:
I use your plugin for events that get posted to our site. It allows upcoming events to be viewed. What I’d like to do now, though, is make a list of posts in only our “Events” category that will list posts starting with the current date and into the future.
We can display the Events category just fine, but when it comes to listing, I can either do highest (farthest in the future) date and back, or lowest (starting with the farthest in the past). What I’m going for is a list that starts on the current date and displays Event posts into the future.
I’ve been picking through the codex for the last couple days trying to find how i can do this, but no luck. As best I can tell there should be an argument that would fit in our WP_Query(“cat=11&showposts=10″); but searching the codex and asking around the WordPress forums has been no help so far.
So, if you know anything that might help, I’d be much obliged to you once again!
Thank you.
OK, for the first problem you can try Different Posts Per Page to change order an number of posts per category. Older posts at the top newer at the bottom.
The second problem ist to start “now”. I don’t know a solution. Maybay it’s ok to show only one month e.g.
<a href=".../?cat=4&m=200901">Events January 2009</a>?Tom – Great looking plugin. To display list of both future and previous events in sidebar, could use this with your plugin:
http://webdemar.com/wordpress/display-future-posts-in-your-wordpress-theme/
I think the advantage of your plugin is that it will actually publish on single.php.
Hello!
I’m to translate your plugin in belorussian language. when You publish this? My email – mrilyuha@gmail.com. Please answer me!
I’ve receive your mails. Thanks for translation. Please be patient.
Hello!
I’m to translate your plugin to belorussian language. when You publish this? My email – mrilyuha@gmail.com. Please answer me!
See the comment above. Perhaps i will update this week.
[...] events. The user can set post dates into the future and they will still appear on the blog. › Visit plugin site › Share and [...]
[...] No Future Posts [...]
I am using wp 2.9.2. The plugin seems to be working however I am not sure how to adjust the general-template file in order to link to the calendar widget. The code in your example seems to have changed a bit since 2.6. Any thoughts?
Thanks for all your time in the creation of the plugin.
The code is on line 1077 now.
thank you so much