New Theme Helpers for Related Posts and Creators
Custom themes can now pull related posts and list works by their creator with a single filter, so theme teams write less template code and pages stay fast.
Building a related posts strip, or a list of works by a given composer, in a custom theme used to mean writing the same gather, filter, and cap logic by hand every time. Theme developers can now do both with a single filter, so a related content section is a couple of lines rather than a fragile loop. Basker works out the data as the page renders and only fetches what that page asks for, so these sections stay fast.
Related posts in one filter
A new 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, so nothing unfinished leaks to patrons.
Look up works by their creator
Themes can now find every work linked to a given person or organisation through the creator field added earlier this year, so a composer or director page can list their programme without custom data wrangling. The lookups run against the creator relationship directly and are cached, so repeat visits stay quick.