# Weird Hugo/Theme behaviour

**URL:** <https://discourse.gohugo.io/t/weird-hugo-theme-behaviour/38025>\
**Category:** support\
**Created:** [April 4, 2022, 1:28am UTC](https://discourse.gohugo.io/t/weird-hugo-theme-behaviour/38025 "2022-04-04T01:28:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jsanchez43](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jsanchez43/32/16658_2.png) [@Jsanchez43](https://discourse.gohugo.io/u/Jsanchez43)\
**Post date:** [April 4, 2022, 1:28am UTC](https://discourse.gohugo.io/t/weird-hugo-theme-behaviour/38025/1 "2022-04-04T01:28:23Z")

</div>

My setup:

Hugo version: hugo v0.91.2-1798BD3F windows/amd64 BuildDate=2021-12-23T15:33:34Z  
OS: Windows 10  
Theme: [WingLim/hugo-tania: A simple theme for bloggers. (github.com)](https://github.com/WingLim/hugo-tania)

I’m having a weird problem which I don’t know how to solve. I have a basic blog with a few posts and a few projects (click the following link to see what i mean). Last night I tried to add a new project/post to my site and the site stopped displaying my posts correctly and started displaying the title of my projects. Here’s what I mean, click the following link to see my site working as intended.

Properly working website: [https://jsanchez.net](https://jsanchez.net)

As you can see, i have a few posts/articles and exactly 5 “projects” below. Now, when I create a new “content/projects/new\_project.md” file, the site no longer displays my articles but it display the projects names instead. See that the articles have the same name/title as the projects in the following image.

 ![Screenshot 2022-04-03 222140](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/3X/8/c/8c86e4582f438179110206ef12a272557e49b336.png)

I suspect this might be a theme error but I just don’t know where to start debugging this. I tried creating different permutations of projects and I’m 100% sure it happens when I have more than 5 markdown files inside “content/projects”.

I appreciate any help, thank your for your time.

---

<div class="post-metadata">

**Author:** ![i40west](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/i40west/32/16561_2.png) [@i40west](https://discourse.gohugo.io/u/i40west)\
**Post date:** [April 4, 2022, 1:54am UTC](https://discourse.gohugo.io/t/weird-hugo-theme-behaviour/38025/2 "2022-04-04T01:54:13Z")

</div>

I think that when you add a project, you now have more projects than posts. Your theme is using `mainSections` to get the first list, and that defaults, according to the documentation, to _the section with the most pages,_ which is now projects.

So, in your config, set mainSections specifically to the post section.

---

<div class="post-metadata">

**Author:** ![Jsanchez43](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jsanchez43/32/16658_2.png) [@Jsanchez43](https://discourse.gohugo.io/u/Jsanchez43)\
**Post date:** [April 4, 2022, 2:18pm UTC](https://discourse.gohugo.io/t/weird-hugo-theme-behaviour/38025/3 "2022-04-04T14:18:59Z")

</div>

That worked perfectly, thank you. ❤

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [April 6, 2022, 2:19pm UTC](https://discourse.gohugo.io/t/weird-hugo-theme-behaviour/38025/4 "2022-04-06T14:19:34Z")

</div>

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