Support

Home Forums Event Espresso Premium Get Loop of Events?

Get Loop of Events?

Posted: January 15, 2014 at 2:47 pm

Viewing 1 reply thread


Katie Bush

January 15, 2014 at 2:47 pm

I took a quick peek through some of the documentation, but I couldn’t find it anywhere. I have one page that shows the events, but on the homepage of the site, I would like to be able to get the three most recent events, for example, but style them differently from my main events page. Is there some kind of loop I can use to get the events loop and fields so that I can do something like

while (event_loop)
<div><?php event_title(); ?></div>
<div>etc</div>

Is something like that possible?


Sidney Harrell

January 15, 2014 at 2:55 pm

The events themselves are not CPTs, so they can’t be used in a loop like regular WP posts. You can create CPT posts of the events using the create-a-post feature at the bottom of the event editor. Then you could use them in a loop like in plugins/event-espresso/post-type-samples/page-event_list.php. Alternatively, you could use a limit on the event list shortcode like [EVENT_LIST limit=3].

Viewing 1 reply thread

The support post ‘Get Loop of 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.

Event Espresso