[eme_events]

[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 (set in the EME option “Number of events to show in lists”). If you give the value “0” there’s no limit.
  • scope lets you choose which events to show: Choose between
    1. today
    2. now--today (this takes the start or end time of the events into account too)
    3. tomorrow
    4. this_week
    5. this_month
    6. this_year
    7. next_week
    8. next_month
    9. next_year
    10. future (this takes the start or end time of the events into account too)
    11. past (this takes the start or end time of the events into account too)
    12. all
    13. 0000-MM (for the events of a specific month MM in the future)
    14. YYYY-MM-DD (for the events on a single day)
    15. YYYY-MM-DD--YYYY-MM-DD (for the events in a certain period)
    16. YYYY-MM-DD--today (events from a certain period in time till today)
    17. ++YYYY-MM-DD (all events starting later than YYYY-MM-DD)
    18. --YYYY-MM-DD (all events ending before YYYY-MM-DD)
    19. today--YYYY-MM-DD (events from today till a certain period in time)
    20. this_week--today
    21. this_month--today
    22. this_year--today
    23. today--this_week shows all events today and this weeks future
    24. 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)
    25. today--this_month
    26. today--this_year
    27. today--future: shows events happening in the future, today included
    28. tomorrow--future: shows events happening in the future, today excluded
    29. past--yesterday: shows events in the past, today excluded
    30. +Nd (with N being a number): show events from today until N days into the future
    31. now--Nd (with N being a number): show events from now (current date and time) until N days into the future
    32. -Nd (with N being a number): show events until N days in the past
    33. +Nm (with N being a number): show events until N months into the future
    34. -Nm (with N being a number): show events until N months in the past
    35. 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)
    36. 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)
    37. relative-Xd--YYYY-MM-DD show events that end YYYY-MM-DD and start X days before that
    38. YYYY-MM-DD--relative+Xd show events that start YYYY-MM-DD and end X days after that
    39. 0000-MM--relative+Xm show events from a specified month in the future till X months later

    Default is future.

  • order indicates the order of the events. You can either choose between ASC (ascendant, default) and DESC (descendant), or create your own order statement (the default ‘ASC’ corresponds with ‘event_start ASC, event_name ASC’).
  • 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
  • template_id_no_events can be used to show a predefined template in case no event exists
  • 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. If this shortcode is used inside a single event, you can also use #_LOCATION_ID as value, resulting in a list of events at the same location as the event currently shown.
  • distance: if set (to a value in meters) and if the location_id param is also set (to an exact location id, or #_LOCATION_ID if this shortcode is used inside a single event), the shortcode will show events at locations withing distance meters from the chosen 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. If you use the special value “#_MYSELF” it will use the wp id of the current logged in user.
  • 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. If you use the special value “#_MYSELF” it will use the wp id of the current logged in user.
  • 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.
  • ignore_filter: if set to 1, the shortcode will ignore the eme filter form if present on the page. Defaults to 0. Using this you can use several shortcodes on 1 page and only some are optionally influenced by the eme_filterform shortcode.

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!

Scroll to Top