New Theme Helpers for Related Posts and Creators
Custom themes can pull related posts and list works by their creator with a single filter each.
Custom themes get two new filters: one that returns related posts, and one that lists works by their creator. A related content section is now a couple of lines of template rather than hand-written gather, filter, and cap logic. Basker resolves the data as the page renders and only fetches what that page asks for.
Related posts in one filter
The related-posts filter returns posts that share a post's tags or categories, newest first, with the current post left out and duplicates removed. You choose whether to match on tags, categories, or both, and how many posts to show. Drafts stay hidden on live pages while remaining visible in preview.
Look up works by their creator
Themes can now find every work linked to a person or organisation through the creator field added earlier this year, so a composer or director page can list their programme. The lookups run against the creator relationship directly and are cached.