Home › Forums › Calendar Products › Events Calendar PRO › querying future post status
- This topic has 10 replies, 4 voices, and was last updated 8 years, 10 months ago by Support Droid.
-
AuthorPosts
-
December 1, 2011 at 7:49 pm #11633JohnParticipant
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?December 2, 2011 at 10:09 am #11663RobMemberHey John. We can help you out here; what exactly are you aiming to accomplish?
December 2, 2011 at 1:00 pm #11668JohnParticipantfor 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.
December 2, 2011 at 2:52 pm #11673RobMemberNope, 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.
December 2, 2011 at 5:26 pm #11685JonahParticipantHi 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,
JonahDecember 3, 2011 at 12:51 pm #11699JohnParticipantHi, Jonah.
Yes, that is basically what I want to do.
Thanks!
December 5, 2011 at 8:17 am #11837RobMemberThanks for confirming, John. Jonah will respond on this today.
December 5, 2011 at 8:21 am #11841JonahParticipantHi 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,
JonahDecember 5, 2011 at 3:18 pm #11856JohnParticipantHi, Jonah.
Thanks. I got it to work with $post rather than $posts. It’s working. I appreciate your help!
Best,
JohnDecember 5, 2011 at 5:51 pm #11861RobMemberExcellent to hear, John! Please let us know if anything else arises going forward.
July 2, 2015 at 7:33 am #974681Support DroidKeymasterThis 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. -
AuthorPosts
- The topic ‘querying future post status’ is closed to new replies.