next-wordpress-starter icon indicating copy to clipboard operation
next-wordpress-starter copied to clipboard

Categories not showing on individual post pages

Open KeriGerheart opened this issue 2 years ago • 3 comments

Looking at the demo site here: https://next-wordpress-starter.spacejelly.dev/posts/how-to-improve-development-experience-with-eslint-extension/

The categories are not showing on the individual posts. When inspecting, it looks like categories return an empty array. I am seeing the same when cloning. Any ideas on how to fix this? Thanks!

KeriGerheart avatar May 30 '23 16:05 KeriGerheart

hey does the category have any entries in it other than itself?

this post for instance works: https://next-wordpress-starter.spacejelly.dev/posts/how-to-automate-deployments-on-content-change-in-wordpress-with-wp-webhooks-and-netlify/

the category has 2 additional posts in it

colbyfayock avatar Jun 14 '23 16:06 colbyfayock

Hi @colbyfayock thanks for responding. Yes- it looks like in that example I gave, for the first category 'Development', that is the only post in there. https://next-wordpress-starter.spacejelly.dev/categories/development/ It does say 'and more', but I am not sure what the others are. Is that intentional that the categories do not show if there is only one post in the cat? (Edited because I made a mistake in my initial response).

KeriGerheart avatar Jun 14 '23 18:06 KeriGerheart

Just another update, that another condition that causes the categories not display is if there is only one category assigned to the post, as seen here: https://next-wordpress-starter.spacejelly.dev/posts/how-to-create-a-headless-wordpress-blog-with-next-js-wordpress-starter/

KeriGerheart avatar Jun 15 '23 18:06 KeriGerheart