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.
- 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
- Using Health Check plugin to find theme and plugin conflicts
- Display connected content using Posts to Posts plugin
- Meta Queries
- Display results as a table