querying future post status

Home Forums Calendar Products Events Calendar PRO querying future post status

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #11633
    John
    Participant

    i’m having some difficulties querying the future post status for the events pro posts.
    would it be the generic single.php or page.php in the theme? or should i be tinkering with the plugin files?

    #11663
    Rob
    Member

    Hey John. We can help you out here; what exactly are you aiming to accomplish?

    #11668
    John
    Participant

    for the single events, i’ve changed the published dates so that the event date and publish dates reflects the start date. So I’m running into the issue that the events become future in post status. comparing this, http://architecture.risd.edu/event/environmental-control-systems-john-fernandez/ to this future post, http://architecture.risd.edu/event/position-practice-john-peterson-damon-rich-ahti-wesphal/. I want to know where I can set the query so that its display both the publish and future. I tired the regular wordpress query method with the_title(); and the_content();
    The title function works, but the content isn’t pulling in anything…

    I hope I’m clear. let me know if i’m not. sorry.

    #11673
    Rob
    Member

    Nope, this is perfect…thanks for confirming. This is a bit outside my technical area of expertise, but I’m going to get our dev Jonah to chime in directly.

    #11685
    Jonah
    Participant

    Hi John,

    I’m still not clear on what you’re trying to do. I understand that a future dated post will not display by default, is that the issue you’re having? You need to display the future events?

    Thanks,
    Jonah

    #11699
    John
    Participant

    Hi, Jonah.

    Yes, that is basically what I want to do.

    Thanks!

    #11837
    Rob
    Member

    Thanks for confirming, John. Jonah will respond on this today.

    #11841
    Jonah
    Participant

    Hi John,

    You can adjust the query by adding the post_status paramter like so:


    $posts = tribe_get_events( array('eventDisplay'=>'upcoming', 'posts_per_page'=>-1, 'post_status'=>array('publish','future')));

    In fact you can use all of the parameters available for WP_Query as referenced here: http://codex.wordpress.org/Class_Reference/WP_Query

    I hope that’s what you need but let me know if you need anything else.

    Regards,
    Jonah

    #11856
    John
    Participant

    Hi, Jonah.

    Thanks. I got it to work with $post rather than $posts. It’s working. I appreciate your help!

    Best,
    John

    #11861
    Rob
    Member

    Excellent to hear, John! Please let us know if anything else arises going forward.

    #974681
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘querying future post status’ is closed to new replies.