WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Type + Single Template + Displaying Future Post (5 posts)

  1. benjaminbixby
    Member
    Posted 3 years ago #

    Hey all,

    Is there a way to click through to a custom post type post, to it's single template, and have it display a "future" post?

    Example: I have an Events custom post type, each post is a separate event, and we add events in advance to the date actually happening. I would like to use custom post types for this...

    I'm guessing this interferes with the logic in the loop, because when you request the "future" post, it will come up as not published. Is there a way to pass the URL to the loop in the single-events.php template and have it display the post correctly?

    Thanks,
    Ben

  2. Jack Barham
    Member
    Posted 2 years ago #

    I have the same issue - Did you ever find a solution to this ..?

  3. benjaminbixby
    Member
    Posted 2 years ago #

    Hey Jack,

    Yeah I think I did... this was awhile back but I saw this come through my email and figured "Hey, not many people would come back to this after having been so long... but.. I will!"...

    So let me take a look back at that particular project to be sure and I will post back.

  4. Jack Barham
    Member
    Posted 2 years ago #

    Thank you, I would really appreciate it... This is a similar forum post I made about it:

    http://wordpress.org/support/topic/display-a-future-custom-post-type-page-without-being-logged-in?replies=2

    Although I found a suitable alternative I would still like to know what to do it properly.

    Thanks - J

  5. benjaminbixby
    Member
    Posted 2 years ago #

    Jack,

    I looked back at the project and it looks like I did the following:

    - Created a specific page template (page-name.php) file in the theme folder
    - Made custom MySQL queries for all of the required future posts
    - Offset the "post date" by a week, based on my event date (when publishing in the WordPress admin)

    I haven't developed in WordPress for awhile, and have since converted over to the ExpressionEngine CMS... it handles these kinds of things much more easily (and doesn't require knowledge of PHP to do so). I'm not sure if you're familiar with ExpressionEngine, but you can check it out at ExpressionEngine.com or use the hashtag #eecms on twitter. If you need rule-based events, you should check out the kick-butt add-on module by Solspace.com called "Calendar" - it extends EE's native functionality quite a bit and the rules you can set for repeating dates are amazing.

    Anyways, if you have any more Q's you can follow me on twitter @ username bixby_benjamin

Topic Closed

This topic has been closed to new replies.

About this Topic