Home Forums Event Espresso Premium Display upcoming events

Display upcoming events

Posted: June 20, 2016 at 8:50 am


June 20, 2016 at 8:50 am


I would like to display 3 (or however many) upcoming events on my homepage. Something along the lines of:

A PHP Loop to display 3 events
<div id=”Event Title”> ######### </div>
<div id=”Event Date”> ######### </div>
<div id=”Event Price”> ######### </div>
<div id=”Event Excerpt”> ######### </div>
<div id=”Event Link>Book Online</div>

Are there shortcodes I can use to do this. If not would you share the bits of code I need to pull into my php.



  • Support Staff

June 20, 2016 at 4:01 pm

Hi there,

We do not have shortcodes to pull in each of those individual sections, however EE posts are Custom Post types (with some additional information) so you can create a similar loop that you would normally use for posts.

@josh has an example of a simple event list here:

You can also use the get_upcoming_events() to pull in all your upcoming events like this:

$events = EEM_Event::instance()->get_upcoming_events( 
        'order_by' => array( 'Datetime.DTT_EVT_start' => 'ASC' )

$events will be an array of your upcoming EE event posts.

Is that what you are looking for?


June 27, 2016 at 2:49 am

Hi All

Is there somewher in the documentation that will tell me what the field names within the array are?
e.g. $event->name() = Event Name
So Event Title, Date, Price, Excerpt, Link would be …


  • Support Staff

June 28, 2016 at 7:28 am

You’ll find examples in the developer documentation:–Model-System/–Model-System/–Model-System/

The support post ‘Display upcoming events’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Josh 3 years, 4 months ago ago

Topic Tags

Tagged: , ,


This topic is: not resolved
Do NOT follow this link or you will be banned from the site!
[gravityform id=96 title=false description=false]
  • This field is for validation purposes and should be left unchanged.
[gravityform id=69 title=false description=false]
  • This field is for validation purposes and should be left unchanged.