Posted: 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? |
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 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. In your event, write up your description and add a To limit the number of events that display on the page, use this shortcode:
or
if you want to add pagination to your mini event list. |
|
|
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.
|
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. |
|
|
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 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? |
|
Have you tried changing order_by=date(start_date) to order_by=date(end_date)? |
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:
|
|
|
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.