Thanks for reaching out to us! Hoperfully there’s a simple way of achieving what you ask for ๐
You can use the wp_count_posts WordPress function. I’ll show you how to do so:
$published_events = wp_count_posts('tribe_events')->publish;
// use var_dump ( wp_count_posts('tribe_events') ); to see all info returned by wp_count_posts
Please let me know if this is what you are looking for and if you have any follow-up questions about this,
Best,
Nico
Thank you, but this show the total number of all events include the expired events.
I want to show the total number of only events in the future.
I hope you understand what I mean.
I’m glad to hear you could work it out from there ๐
Iโll go ahead and close out this thread, but if you need help with anything else please donโt hesitate to create a new one and we will be happy to assist you.
Best,
Nico
Author
Posts
Viewing 6 posts - 1 through 6 (of 6 total)
The topic ‘Show number of current events’ is closed to new replies.