
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeIt sounds like you're working on a front page where you're trying to display post titles and excerpts, but the data isn't showing up. Based on your description, this is likely a GROQ query projection issue where the field names in your query don't match what you're using in your component.
The Problem: When you query for posts on your front page, you need to make sure your GROQ projection uses the same field names (displayTitle and displayExcerpt) that your front-end component is expecting.
Common mistakes:
title and excerpt, but you're trying to access displayTitle and displayExcerpt in your componentThe fix:
Your GROQ query for the front page should look something like this:
*[_type == "post"]{
"displayTitle": title,
"displayExcerpt": excerpt
}The "displayTitle": title syntax creates an alias - it takes the title field from your schema and renames it to displayTitle in the query results. This is how projections work in GROQ - you can select specific fields and rename them to match what your frontend expects.
If you're working with a starter template (like the Next.js blog starter), the original queries might have used different field names. Make sure:
title and excerpt, you either need to alias them in the query (as shown above) OR change your component to use title and excerpt instead of displayTitle and displayExcerptThe query is likely in a file like lib/queries.ts, sanity/lib/queries.ts, or directly in your page component. Double-check that both your front page query and your post page query use the same field naming - if the post page is working, copy that projection structure to your front page query and it should work consistently.
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store