Support

Home Forums Custom Files Add-on (EE3) [EVENT_LIST] Ordering events based on a greater then/less than date range?

[EVENT_LIST] Ordering events based on a greater then/less than date range?

Posted: August 13, 2012 at 5:06 pm

Viewing 9 reply threads


James Kirst

August 13, 2012 at 5:06 pm

Hey there!

Just a quick question. We run a movie theater and are using event espresso for ticket sales. On our homepage we want to have 2 [EVENT_LIST] sections. One section will show events playing today, the other will show events playing in the future. Is there a way to use the {EVENT_LIST] shortcode to accomplish this?

Thanks a bunch!

  • This topic was modified 12 years, 4 months ago by Josh. Reason: Moving to custom files forum


Garth

  • Support Staff

August 13, 2012 at 9:40 pm

https://eventespresso.com/wiki/shortcodes-template-variables/ take a look at the Event List shortcode.

[EVENT_LIST order_by=date(start_date),id]


James Kirst

August 13, 2012 at 10:08 pm

Hey Garth,

Thanks a lot for the quick response. We just purchased this plugin and are still getting used to the myriad options and shortcodes. I will definitely give what you suggested a shot. Is there anything in that shortcode that should be customized to show the dates (present or future) that I want to show?

Thanks again!


Josh

  • Support Staff

August 14, 2012 at 12:46 pm

There isn’t a parameter that can be added to [EVENT_LIST] that will display events for today only. However, there is a movie list template included with the custom files add-on.

This template gets called by using the [ESPRESSO_MOVIE_TABLE] shortcode, and it includes an option to set how many days into the future to display events for (max_days=).


James Kirst

August 15, 2012 at 8:25 am

Both of those options sound great for listing events, but it doesn’t really solve my problem of being able to list today’s events in one column, and future events in another. Basically, one column would only show events from today, and the next column would show events starting from tomorrow going forward. I also need to be able to limit them to 3 events per column, and it’s my understanding that you can’t use more than one parameter per shortcode is that right?

Any help would be great.


James Kirst

August 15, 2012 at 8:31 am

Oh, I also can’t seem to get that [ESPRESSO_MOVIE_TABLE] shortcode to work. Other custom shortcodes work just fine, just not that one.


Josh

  • Support Staff

August 15, 2012 at 12:59 pm

I can help you get that one working. There is some output buffering that should have been removed in the last update. Open up movie_list.php and remove lines 35 and 38, where the contents are:

ob_start();

and

ob_end_clean();

You can use this and a variation of this shortcode for each column by wrapping them each in a div like this:

<div class="one-half first">[movie table shortcode max_days=1 qty=3]</div>
<div class="one-half">[modified movie table shortcode max_days=10 qty=3]</div>

Many themes will have a means of creating columns on a page using CSS. The above example would work on a Genesis theme.

The custom files add-on templates are not always the perfect solution for every use case, so the idea is they can be used as starting points to get you on your way. The existing movie table shortcode can be duplicated and modified to create a new shortcode that will ‘skip over’ today’s events and only display a list of tomorrow’s films. Other tweaks will probably be necessary, too. Making these customizations to the specifications you require will take some custom development, so you may need need to hire a developer for this.


James Kirst

August 15, 2012 at 5:37 pm

Thanks! It look like the [ESPRESSO_MOVIE_TABLE] shortcode is now showing up, but I’m not seeing any content in the table. The headers show up, but not the content. Any ideas? If I do a straight up {EVENT_LIST] shortcode, I see the content, but not getting any from the [ESPRESSO_MOVIE_TABLE] code.


Josh

  • Support Staff

August 16, 2012 at 9:52 am

The movie table probably requires a category parameter. If you do not plan on using category filtering, you could try modifying the code in movie_list.php something along the lines of this gist.


James Kirst

August 17, 2012 at 4:05 pm

Hey Josh,

That worked great. The only thing that I’m having trouble figuring out is why the event times are all listed in the 24 hour format rather than 12 hour. I checked my WP settings and everything is set correctly there. Also, my events seem to showing the correct time. Any thoughts on how I could get this to display in the 12 hour format?

Thanks again! We’re getting there slowly but surely! 🙂

Viewing 9 reply threads

The support post ‘[EVENT_LIST] Ordering events based on a greater then/less than date range?’ 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