How to call blog post categories in HTML in a React project
5 replies
Last updated: Dec 17, 2021
S
Hey guys, I’m building a blog using auto-generated Blog (schema). How do I get blog post categories and category and call them in div ? /sidangkalam/src/pages/Homepage.js
but <span className=“thumb-title”>{post.categories.title}</span> didn’t return anything. How do you call it in html ? 😅
Dec 16, 2021, 2:49 PM
S
Thanks for your response but <span className=“thumb-title”>{post.categories.title}</span> didn’t return anything. How do you call it in html ? 😅
Dec 16, 2021, 2:49 PM
R
Hmm, are you sure your query is returning results? If you
console.log
it, what do you get?
Dec 16, 2021, 5:36 PM
R
Hmm, are you sure your query is returning results? If you
The Sanity Composable Content Cloud is the headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.