Sugar Calendar, like most other event calendars, stores the event dates as metadata. To sort your results by the event date (meta_key is
[display-posts post_type="event" orderby="meta_value_num" order="ASC"]
That will list every event starting with the oldest to newest.
If you want to list only upcoming events, we’ll need to do a meta query. This specific meta query requires PHP coding as it’s too complicated to implement directly in the shortcode.
This is a great use case for adding shortcut arguments. If post_type=”event”, add all the necessary query parameters.
- Display image from post content if no featured image
- Add extra text after title
- Use the WordPress date format
- Add Post ID class to each listing item
- Add class to current post for styling
- Display post count as title of listing
- Display meta value in output
- Display author avatar
- Display the current post
- FacetWP Support