Home › Forums › Calendar Products › Events Calendar PRO › how do I display the next upcoming event on a page? (TEC pro)
- This topic has 7 replies, 3 voices, and was last updated 12 years, 6 months ago by
Chris.
-
AuthorPosts
-
October 10, 2013 at 10:41 am #70333
ironandsteel
ParticipantOn the home page, I want to display the next upcoming event. How can I do this?
October 10, 2013 at 2:58 pm #70435Kelly
ParticipantHi, ironandsteel. Would using a widget work for you?
If that’s the case, you can definitely use the list widget and limit the number of events on a widget to 1. There’s even a tutorial on how to add your featured images to it: https://theeventscalendar.com/adding-post-thumbnails-to-the-events-list-widget/
Hope that helps! 🙂
October 10, 2013 at 3:15 pm #70443ironandsteel
ParticipantI will investigate- but isn’t there a shortcode I can insert into the page that will show the latest event? If I can make the widget appear along with some hand-entered html for the home page, that will work. I’m kinda new to wordpress, but a very experienced php/javascript etc developer. Thanks!
October 10, 2013 at 3:19 pm #70444ironandsteel
ParticipantActually, the list widget will not do it. I need to display all of the event info- just as though you went to the single event page. Maybe I’ll look at the list widget code and see if I can figure out what’s going on.
Thanks.October 11, 2013 at 7:32 am #70532ironandsteel
ParticipantKelly- i want to bump this question. There MUST be a simple way to display the next upcoming event and all its details in a page. I can’t be the first person to want to do this. When you go to the home page, we want to see what the next thing coming up is.
Isn’t there a short code that does this?
Thanks!October 11, 2013 at 8:12 am #70539Kelly
ParticipantHi, ironandsteel. We’re happy to help get you pointed in the right direction. 🙂
First, I want to be very clear that we need you to respect our commitments about forum response times. Here’s the excerpt from the main Forums page to refresh your memory:
Set your expectations. Please understand that we get a lot of traffic on the support forums, and that we respond to each thread in as timely a fashion as possible. That being said we generally require 24-48 hours (during the workweek) to hit new threads. The forums are not monitored on weekends. Please be patient when posting and know we’ll get to your issue as quickly as we possibly can.
Posting more often will not get you a quicker response. 🙂
That said, since you’re an experienced developer, I’m going to point you at our Technical Documentation and Themer’s Guide, both linked in the right sidebar. That should give you what you need to craft a solution that works for you.
Specifically, tribe_get_events() (http://docs.tri.be/Events-Calendar/function-tribe_get_events.html) would be the function that most likely will get you what you’re aiming for. It is essentially built atop WP_Query (http://codex.wordpress.org/Class_Reference/WP_Query). You could use that to pull in the next upcoming event.
As far as the list widget goes, it can absolutely be customized to display full event details, and it is not restricted to being used in an existing sidebar–you can register an extra sidebar for a special case (http://codex.wordpress.org/Function_Reference/register_sidebar) or indeed embed it yourself outside of a sidebar using the_widget() (http://codex.wordpress.org/Function_Reference/the_widget).
As a general point, it sounds like perhaps you might want to brush up on WordPress’s capabilities and structure before going much deeper. If you’re going to continue using the plugin and attempting to customize it, it’s probably a good idea for you to take the time to become conversant in it. Unfortunately, that’s outside of our mandate here in the support forums.
Lastly, please check out our FAQ for info about shortcodes, etc.: https://theeventscalendar.com/support/faqs
Thanks for your support!! 🙂
October 11, 2013 at 8:38 am #70548ironandsteel
ParticipantGreat response- thanks!
October 13, 2013 at 9:12 pm #70805Chris
ParticipantGoing to close this as resolved 🙂
-Chris
-
AuthorPosts
- The topic ‘how do I display the next upcoming event on a page? (TEC pro)’ is closed to new replies.
