Support

Home Forums Event Espresso Premium List event meta data

List event meta data

Posted: May 29, 2013 at 2:27 pm

Viewing 6 reply threads


Hansteen

May 29, 2013 at 2:27 pm

Is there a function similar to wp_get_recent_posts() for events? I would like to make a template in which I get unexpired events in a category and then loop through the events and display a list of the meta data from each event.


Hansteen

May 29, 2013 at 4:38 pm

I tried:

query_posts(array(‘post_type’=>’espresso_event’));

in a template, but I’m not getting any posts. Shouldn’t this work?


Josh

  • Support Staff

May 30, 2013 at 10:13 am

Hi there,

If you look in the Event Espresso plugin folder there is a folder named “post-type-samples”. There’s a sample template with code that runs a query for the espresso_event post type that you could use/adapt.


Hansteen

May 30, 2013 at 10:16 am

Thanks. I’ll check it out.


Hansteen

May 30, 2013 at 12:08 pm

I tried the template as is, but no events showed up. Do the events need to be saved as posts to show up with the page-event_list.php template?


Josh

  • Support Staff

May 30, 2013 at 2:29 pm

They need to be saved as Event posts, yes. Here is a link to the documentation that outlines how to set up Event post types:

https://eventespresso.com/wiki/custom-post-types-basic-setup/


Hansteen

May 30, 2013 at 2:41 pm

OK. Thanks.

Viewing 6 reply threads

The support post ‘List event meta data’ 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