🔮 Sanity Create is here. Writing is reinvented. Try now, no developer setup

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– build remarkable experiences at scale

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

Was this answer helpful?