Display all posts under a single category

My Hugo website is deployed here.

I have two taxonomies, categories and tags. The only category I care about is top pick, which is supposed to be displayed under the Top Picks page. Currently, it just displays a list of all posts there.

How can I display posts from only the category top pick, in the same way (styling) that they are being displayed on the homepage right now. By this I mean I don’t want single line text links, but the way the posts have been styled on the homepage (as opposed to something here)

My repo is hosted here, if that helps.

1 Like
  1. Point this to /categories/top-pick/
  2. Add whatever styling you want to layouts/category/term.html. Also see docs for list of other possible layout locations.

Doc: https://gohugo.io/templates/taxonomy-templates/#list-all-content-in-a-given-taxonomy

1 Like

Isn’t there a simpler way to just filter what is being displayed on index.html (homepage) and copy that code into layouts/category/index.html?

Edit: Copied list.html from defaults into layouts/category/list.html and it works!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.