Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

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?