hugo-coder
hugo-coder copied to clipboard
How to automatically map the posts to category and display on home page
I am using hugo coder theme. is it possible to create a new page something like categories instead of project where it will show the post under BLOG based on the category of the posts. something like attached picture. I have created a category page by editing the config file by renaming the Projects( which was default in coder theme). It just displays the categories. How to display the posts as well.
My page which shows only categories, No posts displayed
It is possible to do that, but you will need to override or create some template files. Try creating a new taxonomy template for projects
. Probably you will need to use the partial list template too.
where should i create this new taxonomy template. which folder i should upload. Should i overwrite any existing file. I believe we have taxonomy details only in config file
You should but the new taxonomy template in the same path as the other, in layout/partial/taxonomy
. You don't need to change this theme files directly, but you could if you want to do it. If you create the same directory structure in your site project, Hugo will know that you are adding new templates or overriding existing ones.
Would be extremely grateful if someone figure this out and is willing to share it ♥️