List posts in the current category

Display Posts lets you limit posts to a certain category with the category parameter. But what if you’d like to show other posts in the current post’s category without having to type it out each time. This is especially useful in widgets and sidebars since you can add the shortcode once and it will automatically update to […]

Exclude posts already displayed

If you’re using the Display Posts Shortcode multiple times in one page, you can use this to exclude already displayed posts from new shortcode queries. This will prevent duplicate posts. If you have other, non-Display Posts queries running on the page and would like to exclude them as well, you’ll need to modify those queries […]

Display upcoming events from Sugar Event Calendar

Sugar Calendar, like most other event calendars, stores the event dates as metadata. To sort your results by the event date (meta_key is sc_event_date_time) use: 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 […]