Home Forums Event Espresso Premium Event as post

Event as post

Posted: August 21, 2012 at 12:31 am

Michael Watt

August 21, 2012 at 12:31 am

Via the Event Overview, I’m creating an event and enabling “Add post for this event”. Events are then displayed on the home page with this shortcut [EVENT_LIST]

My intention is to simply display an introduction or teaser of the event, ie. title, date and brief description. Is this possible? Could you advise me or perhaps point me to a guide?

In addition, how can I display 3 or 5 most recent event teasers on the home page?

Chris Reynolds

  • Support Staff

August 21, 2012 at 1:48 pm

What you are talking about are two different things and how you handle it would depend on which of these things you want to do.

The Add Post for This Event option will create a blog post for the event. This is in addition to the regular event you just created. The [EVENT_LIST] shortcode has nothing to do with blog posts — it only displays events. So, how you would choose to display and organize the event posts would happen in your theme by manipulating the WordPress loop or creating a custom page, or putting all of those in a category, or using the Custom Post Type option in Event Espresso and splitting those off into separate Espresso Event Posts so they are not handled the same as blog posts.

However, displaying a list of events with their title, date, and a brief description can be done without creating blog posts or event posts at all. [EVENT_LIST] already does half of that, the other half would be done by manipulating the [EVENT_LIST] shortcode and using the <!-- more --> tag…

In your event, write up your description and add a <!-- more --> tag somewhere in the description where you want the short description to end. On your Template Settings page, be sure you set “Display Short Descriptions in event listings” is set to Yes.

use short descriptions

To limit the number of events that display on the page, use this shortcode:

 [EVENT_LIST limit=5]


 [EVENT_LIST events_per_page=5]

if you want to add pagination to your mini event list.

Michael Watt

August 23, 2012 at 8:43 am

Thanks Chris, the more tag is working well.

I wish to change the position of some of the event parameters displayed in the teaser, ie. date and price. Am I correct in assuming that these can be edited within a php file?

With regards to the shortcode, is there a way to list the events from newest to oldest? Currently the events are being shown as August followed by September but I’d prefer to show the newest events at the top followed by older events (both events that are still running or have finished).

Thanks for your support.

  • This reply was modified 10 years, 3 months ago by  Michael Watt.

Seth Shoultes

  • Support Staff

August 23, 2012 at 9:11 pm

Yes, the position of the event parameters can be controlled from within the Event Espresso template files.

You can sort the data using the “order_by” parameter of the EVENT_LIST shortcode. Eg. [EVENT_LIST order_by=date(start_date),id]

Michael Watt

September 4, 2012 at 11:34 pm

Seth, thanks for your patience with this.

I’m still struggling with the order in which the events are being displayed.

The following does work [EVENT_LIST order_by=date(start_date),id show_expired=true events_per_page=3]
however, it displays events from old to new.
ie. 4 events being displayed as
1. Feb 2012
2. March 2012
3. August 2012
4. November 2012

My goal is to display these events from newest to oldest.

I’m not sure if it is important or not but due to the random order that I have been creating events, the ID order is in know way sequentially related to the dates of the events.

Could you please help me display from new to old?


September 6, 2012 at 1:48 am

Have you tried changing order_by=date(start_date) to order_by=date(end_date)?

Shortcode information

Seth Shoultes

  • Support Staff

September 6, 2012 at 11:32 am

Hi Michael,

Have you tried removing the “id” parameter?

We are adding a sort direction parameter the next version that is due out this week or next. If you would like to modify the files yourself, you can modify the following file.

In the “event-espresso/templates/event_list.php file you can change line #109:

$sql .= $order_by != 'NULL' ? " ORDER BY " . $order_by . " ASC " : " ORDER BY date(start_date), id ASC ";

Michael Watt

September 6, 2012 at 7:25 pm

Thanks Seth,

I’ll hold on until the next version and hopefully that will solve the issue.

The support post ‘Event as post’ 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