Description

Displays a list of events, according to given parameters.

Usage

em_display_events($args)

Parameters

  • $args | array – an array of parameters (optional)
    • number_of_events | int – number of events to be displayed. Defaults to 5. Use 0 to display all published events.
    • categories | int/array – single id or array of event-category ID’s. Allows to display events from selected event categories.
    • locations | int/array – single id or array of event-location ID’s. Allows to display events from selected event locations.
    • organizers | int/array – single id or array of event-organizer ID’s. Allows to display events from selected event organizer.
    • order_by | string – sort retrieved events by parameter. Defaults to ‘start’
      • start (default)
      • end
      • publish
      • title
    • order | string – designates the ascending or descending order of the ‘orderby’ parameter. Defaults to ‘DESC’
      • asc
      • desc (default)
    • show_past_events | boolean – display past events or not. Defaults to show_past_events option in plugin settings.
    • show_event_thumbnail | boolean – display event thumbnail. Defaults to TRUE.
    • show_event_excerpt | boolean – display event excerpt. Defaults to TRUE.
    • event_thumbnail_size | string – event thumbnail size. Defaults to ‘thumbnail’
    • no_events_message | string – the message if no events were returned in query. Defaults to ‘No Events’
    • date_format | string – a date format recognizable by date() PHP function, for example: Y-m-d
    • time_format | string – a time format recognizable by date() PHP function, for example: H:i:s

Return

Identical to get_posts() – a list of event (post) objects.

No replies yet

Be first to start the conversation.

Leave a Reply

Please, do not use this form for technical support. To get support for our plugins, use the support forum.

Your email address will not be published. Required fields are marked *