WordPress.org

Ready to get started?Download WordPress

Forums

show future posts (11 posts)

  1. micha_2000
    Member
    Posted 8 years ago #

    hey guys,
    i already asked in the german forum for a solution of this problem. but unforunatly no one could help me. so i gonna try it here:
    i wanna have the following feature implemented or find a plugin for it:
    i want my wordpress2.0 blog to show every post, even the future posts. the future posts should be available to every visitor of my site.
    i want to write a post with a future date that will stay at the top of my blog until the date of the post is the actually date. i wanna use this as a feature to announce upcoming events at the top of my blog. do you think it is possible to implement this?
    i already tried to edit the classes.php. but i had no effort so far.

    any hints?

    thanks a lot, michael.

  2. Superiorgender
    Member
    Posted 8 years ago #

    Michael - why not use one of the plugins that force a post to be visible. ex. Always On Top (Adhesive (http://www.asymptomatic.net/wp-hacks) )

  3. micha_2000
    Member
    Posted 8 years ago #

    first: thanks for your response!
    it's getting closer to a solution.
    but that plugin *always* forces the "sticky post" to be the top post. i want the future post to be the top post until the date of this future post has come.

    sorry, but i hope you know, what i mean. it's a little hard to explain what i want in english language..

    i also have some problems with this plugin. for example i can't get access to the configure site which they describe at their website.

  4. moshu
    Member
    Posted 8 years ago #

  5. micha_2000
    Member
    Posted 8 years ago #

    that also looks very nice.
    but still the same problem. it is not possible to have future events visible at the index page, right on the top until their date isn't in "future" any more..
    or did i overlook something?

  6. moshu
    Member
    Posted 8 years ago #

    Well, probably not automatically. I used this pkugin only once on a client's site and they didn't have such a request, so I don't remember all the details.
    Using a customized Loop and some tweaking it might be possible...

  7. higherbeats
    Member
    Posted 7 years ago #

    hi there, i want to use my wordpesssite as an dates calender like site as well.
    and want to see, future,present and past events all at the i same time as last posts or when i choose a category.
    i think calendar 3.0 just creates a new category that shows then only all future posts....

    any news to our problem?

  8. mendezki
    Member
    Posted 7 years ago #

    This topic deals with this stuff.

    If anyone knows how to make the future post list month-separated, I'd love to hear : )

  9. higherbeats
    Member
    Posted 7 years ago #

    irgendwie schläft hier jeder oder mich will keiner mehr gern lesen hier oder es fehlt allen die bildung. dadurch mal die lösung selbst durch mich und meine freunde nun hier gepostet:

    Diff:
    --- classes_old.php 2007-03-28 22:09:15.000000000 +0200
    +++ classes.php 2007-03-28 21:59:02.000000000 +0200
    @@ -590,14 +590,14 @@

    $now = gmdate('Y-m-d H:i:59');

    //only select past-dated posts, except if a logged in user is viewing a single: then, if they
    //can edit the post, we let them through
    - if ($pagenow != 'post.php' && $pagenow != 'edit.php' && !($this->is_single && $user_ID)) {
    - $where .= " AND post_date_gmt <= '$now'";
    - $distinct = 'DISTINCT';
    - }
    + //if ($pagenow != 'post.php' && $pagenow != 'edit.php' && !($this->is_single && $user_ID)) {
    + // $where .= " AND post_date_gmt <= '$now'";
    + // $distinct = 'DISTINCT';
    + //}

    if ( $this->is_attachment ) {
    $where .= " AND (post_status = 'attachment')";
    } elseif ($this->is_page) {
    $where .= " AND (post_status = 'static')";

    naja besser ware es so :if ( ($!show_all) && ($pagenow != 'post.php' && $pagenow != 'edit.php' && !($this->is_single && $user_ID)) )
    nun das ----(!show_all) ----steht fuer die config option die es noch nicht gibt die das einfach ausschaltet !show_all -> nicht show_all

    funktioniert als workaround perfekt.
    wäre toll, wenn ein developper die show all! varibale als globale in den upstream mit übernehmen würde

    und:
    in wordpress/wp-includes/template-functions-general.php

    --- template-functions-general_old.php 2007-03-28 23:01:55.000000000 +0200
    +++ template-functions-general.php 2007-03-28 22:50:41.000000000 +0200
    @@ -328,11 +328,11 @@
    $add_minutes = intval(60 * (get_settings('gmt_offset') - $add_hours));

    $now = current_time('mysql');

    if ( 'monthly' == $type ) {
    - $arcresults = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS year, MONTH(post_date) AS month, count(ID) as posts FROM $wpdb->posts WHERE post_date < '$now' AND post_date != '0000-00-00 00:00:00' AND post_status = 'publish' GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC" . $limit);
    + $arcresults = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS year, MONTH(post_date) AS month, count(ID) as posts FROM $wpdb->posts WHERE post_date != '0000-00-00 00:00:00' AND post_status = 'publish' GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC" . $limit);
    if ( $arcresults ) {
    $afterafter = $after;
    foreach ( $arcresults as $arcresult ) {
    $url = get_month_link($arcresult->year, $arcresult->month);
    if ( $show_post_count ) {

    damit das archiv auch mit funktioniert

  10. mendezki
    Member
    Posted 7 years ago #

    Thanks higherbeats, but where and how do I put this code (Yes, admittandly I am generally sleeping and most definitely undereducated on this matter)?

  11. zota
    Member
    Posted 7 years ago #

    Here's a hack to replace wp-includes/posts.php with a version that publishes future posts.

    It works for me with 2.1.3 (nothing else did)

Topic Closed

This topic has been closed to new replies.

About this Topic