Skip to content

[eme_events]

23-Jan-11

[eme_events]

As the eme_get_events_list template tag does, this shows a list of events in the page where you put this shortcode. It accepts the following parameters:

  • limit indicates the maximum number of events to display. Default is 10. If you give the value “0” there’s no limit.
  • scope lets you choose which events to show: Choose between
    1. today
    2. tomorrow
    3. this_week
    4. this_month
    5. this_year
    6. next_week
    7. next_month
    8. future
    9. past
    10. all
    11. 0000-MM (for the events of a specific month)
    12. YYYY-MM-DD (for the events on a single day)
    13. YYYY-MM-DD--YYYY-MM-DD (for the events in a certain period)
    14. YYYY-MM-DD--today (events from a certain period in time till today)
    15. ++YYYY-MM-DD (all events starting later than YYYY-MM-DD)
    16. --YYYY-MM-DD (all events ending before YYYY-MM-DD)
    17. today--YYYY-MM-DD (events from today till a certain period in time)
    18. this_week--today
    19. this_month--today
    20. this_year--today
    21. today--this_week shows all events today and this weeks future
    22. today--this_week_plus_one shows all events today and this weeks future, plus one day (so it shows events happening on the first day of next week as well)
    23. today--this_month
    24. today--this_year
    25. tomorrow--future: shows events happening in the future, today excluded
    26. +Nd (with N being a number): show events until N days into the future
    27. -Nd (with N being a number): show events until N days in the past
    28. +Nm (with N being a number): show events until N months into the future
    29. -Nm (with N being a number): show events until N months in the past
    30. Nm--Mm, to get the events from month N in the past/future till month M in the past future (eg. scope=-3m–2m , scope=0m–3m)
    31. Nd--Md (with N being a number): show events from day N in the past/future till day M in the past/future (eg. scope=-3d–2d , scope=0d–3d)

    Default is future.

  • order indicates the order of the events. Choose between ASC (ascendant, default) and DESC (descendant).
  • format override the format of each item. If not specified and the option template_id is not used as well, Events Manager Extended will use the format specified in the Default event list format setting of the setting page.
  • template_id, template_id_header andtemplate_id_footer use predefined format templates for the event listing, header and/or footer. See http://www.e-dynamics.be/wordpress/?cat=51
  • echo indicates whether the list should be printed (true) or just returned (false). This option should be ignored, unless you know what you are doing.
  • category limits the events shown to those of a certain category ID. You can specify multiple categories for AND and OR limitations: “1,3” for events in category 1 OR 3, “1+3″ for events in category 1 AND 3. Use the literal ‘none’ if you want to filter on events without category: “1,none” would mean to show events in category 1 or without category.
  • notcategory limits the events shown to those not in a certain category ID (see above).
  • location_id limits the events shown to those of a certain location ID. You can also use OR and AND for multiple locations: “1,3” (location 1 OR 3) or “1+3″ (location 1 AND 3). Use the literal ‘none’ if you want to filter on events without location: “1,none” would mean to show events in location 1 or without location. When the shortcode [events_list] is used in a location description, you can also use “this_location” as value, to indicate you want to limit the events shown to the ones in the mentioned location.
  • showperiod first show the month/day and then the list of events in that month/day. Choose between daily, monthly or yearly. The date format for the monthly showperiod can be changed in the Settings page.
  • link_showperiodif showperiod=daily and link_showperiod=1, then the shown days are links that will go to events for just that day
  • show_ongoing to indicate you want the scopes to include end dates (ongoing events) upon evaluation (like e.g. future events include events starting in the past, but ending in the future), or just the start date. Default: 1
  • author limits the events shown to those of a certain author (loginname). You can specify multiple authors for OR limitations: “admin,admin2″ for events created by user admin OR user admin2
  • contact_person limits the events shown to those of a certain contact person (loginname). You can specify multiple contact persons for OR limitations: “admin,admin2″ for events whose contact persons are user admin OR user admin2
  • paging controls wether or not you want to activate pagination in the events listed. The default is “0” (off), use “1” to indicate you want pagination. Period paging is also possible: if you use paging=1, limit=0 and scope=today,this_week,this_month,this_year you’ll be able to browse to previous/next days/weeks/months/years
  • long_events: if set to 0, events will only be shown on their startdate, if 1 events spanning multiple days will be shown on each of those days. Defaults to 0.
  • user_registered_only: if set to 1, the result will be a list of events the user has registered for (only works for WP registered users of course). Defaults to 0.
  • show_recurrent_events_once: if set to 1, recurring events will only be shown once in the list (the next occurence).
  • template_id, template_id_header, template_id_footer (optional): use a predefined format template for the event list header, footer or list entry, instead of the default settings configured. See http://www.e-dynamics.be/wordpress/?cat=51. Because the events returned are a list, you can define specific templates for the header, footer and an entry in that list.

Some examples:

[eme_events limit=20]
[eme_events limit=0 showperiod=monthly]
[eme_events scope=2010-00-00--2010-12-31 limit=0]
[eme_events scope=0000-04 limit=0]
[eme_events category=1,3] (gets you the list of future events in categories with ID 1 OR 3)
[eme_events category=1+3] (gets you the list of future events in categories with ID 1 AND 3)
[eme_events author=admin45] (gets you the list of future events created by user admin45)
[eme_events paging=1 limit=0 scope=this_week] (displays all events of this week, with pagination to previous/next weeks)
[eme_events template_id=3 template_id_header=7 template_id_footer=9]

As mentioned when explaining the location_id parameter, you can even use [eme_events] inside a location description, paging and all!