Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to automatically map the posts to category and display on home page #649

Open
tcprks opened this issue Feb 16, 2022 · 4 comments
Open

Comments

@tcprks
Copy link

tcprks commented Feb 16, 2022

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.
cat
cat1
My page which shows only categories, No posts displayed
noposts

@luizdepra
Copy link
Owner

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.

@tcprks
Copy link
Author

tcprks commented Feb 16, 2022

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

@luizdepra
Copy link
Owner

luizdepra commented Feb 20, 2022

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.

@erickhun
Copy link

Would be extremely grateful if someone figure this out and is willing to share it ♥️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants