πŸ‘€ See Sanity in action: Watch product demo now β†’

How to Query all Post with Certain Categories or for Certain Authors

2 replies
Last updated: Aug 16, 2022
*[_type == "post" &&  author.name == "john smith"]
, for example
Aug 16, 2022, 2:24 PM
If you're trying to match an array of categories to another array of categories, you'll need to use this method!
Aug 16, 2022, 4:59 PM

Sanity.io – build remarkable experiences at scale

Sanity is a customizable solution that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.