WordPress.org

Ready to get started?Download WordPress

Forums

Display "Future Posts" Solutions (11 posts)

  1. Cristiano
    Member
    Posted 5 years ago #

    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://wordpress.org/support/topic/141099?replies=2

      I 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://wordpress.org/support/topic/181245?replies=27

        I 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://wordpress.org/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!

  2. kwbridge
    Member
    Posted 5 years ago #

    Have you looked at the Upcoming Posts plugin?

    http://wordpress.org/extend/plugins/upcoming-posts/

  3. Cristiano
    Member
    Posted 5 years ago #

    Thanks for the information kwbridge, I will take a look in this plugin... but by my first look, I don´t think it will help a lot... I hope I´m wrong!!! ;)

  4. Cristiano
    Member
    Posted 5 years ago #

    Please, any help!!! :)

  5. Cristiano
    Member
    Posted 5 years ago #

    Still have the same problems... any help please!!!

  6. Ecir Hana
    Member
    Posted 5 years ago #

    Hi,

    please, do you have any news on this? I'm also interested in similar feature...

  7. Cristiano
    Member
    Posted 5 years ago #

    Hi Ecir,
    No... in fact, one of the problems just disapeared! Now its paginating weel, the WP seems don´t consider the past events anymore...

    I´m still in tests, you can see it on: http://www.bcnit.es
    Let me know if I can help you

  8. Ecir Hana
    Member
    Posted 5 years ago #

    Thanks for the reply!

    I'm not sure if I can follow the example though, could you please elaborate a bit? Which way (of the three above) did you use?

    My situation is a bit more complicated since I also need multi-lingual posts. For that, I'm using qTranslate but it breaks half of the "upcomning event / gigs" plugins.

    Just for the reference, here are the ones I tried maybe you or someone will find the list of some use:

    - GigPress - currently one of the two favorites, unfortunately for me, it is written very much from the music-band-side.
    - Event Calendar (3.2beta2) - other favorite, if I wont be able to use the methods you listed above I will probably use this. It just creates another date field which is then used to list the upcoming events. And from all the plugins I tried it works best with qTranslate.
    - GigsCalendar - quite nice, unfortunately it breaks for me in Firefox.
    - WPListCal - it was my favorite until qTranslate broke it.
    - WP-Events - breaks in qT.
    - Vent - one has to manually add custom field end date.
    - Upcoming posts & Subzane upcoming posts - very basic, just lists the future events, unfortunately for me, maybe a bit too basic.
    - No future posts & The future is now - as you said above, they just publish the future posts. Unfortunately, there is no way to keep the future posts somewhat separate from the 'regular' ones so you end up with homepage filled with all the post from the future (chronological order).

    I think I need one or two things: to list a few upcoming events in the sidebar with links to the actual event posts, and a 'custom' page which lists all the upcoming event for the month (similar to sidebar thing but a bit more complex).

    So it seems to me right now that maybe EC3 is the way to go. I just don't really like that a post has two dates so I was happy to find several of your posts...

  9. cleveragency
    Member
    Posted 4 years ago #

    There's a much more elegant way to do this, but it relies on the 2) Install "The Future is Now" plugin. When I was attempting this at first, I encountered the same problem you did. I set a post limit in the query (show_posts=5) and my query cycled through all of the posts, and considered 3 old/archived posts in the loop and only ended up displaying 2 that were considered current/future.

    So, I decided to set no post limit in the query and then limit the number of posts being displayed in the post output loop.

    Here's an example of a way to display 5 upcoming events that works with "The Future is Now" plugin:

    <?php $my_query = new WP_Query("category_name=job-fair&order=ASC");
        if ($my_query->have_posts()) {
            $i = 0;
            while ($my_query->have_posts() && $i < 5 ) : $my_query->the_post(); $do_not_duplicate = $post->ID;
        if (get_the_time('Ymd') >= date('Ymd')) : $i++; ?>
            //Your code that you want display//
    <?php endif; endwhile; } ?>

    If you need any more help or have any questions, you can contact me directly: Bobby Duebelbeis - St. Louis Web Developer

  10. merchantweb
    Member
    Posted 4 years ago #

    I am using your solution, cleveragency. I was wondering if there was a way to keep the previous and next links using this solution. Mine disappear... I am also curious how you would edit the code to exclude current events and only list events after the current day. Thanks for the great tip already!

  11. Stanley Dumanig
    Member
    Posted 4 years ago #

    If you want to simply display a list of future posts and be able to view it in single post template(single.php) and be able to comment on future posts then you need to install this plugin:
    http://wordpress.org/extend/plugins/show-future-posts-on-single-post/

    See running example at Marketing Radio Show

Topic Closed

This topic has been closed to new replies.

About this Topic