This solution is working well if we have Section as content/status but not working for sub section. I.e.: content/status/sub.
I want to unlist posts items published under sub section only (not from content/status), from home/index page. But the same should be accessible with http://sitename.com/status/sub
Yes. There is nothing about sub-sections. I want to change from {{ if ne .Section "todo" }} to {{ if ne .Section "code/todo" }}. Where todo is subdirectory under code Section.
{{ define "main" }}
{{ $paginator := .Paginate (where .Data.Pages "Type" "ne" "page") .Site.Params.Paginate }}
{{ range where .Paginator.Pages "Type" "ne" "page" }}
{{ if ne .Section "todo" }}
<div class="article-wrapper u-cf">
{{ if or (fileExists (print "layouts/partials/content-type/" .Type ".html") ) (fileExists (print "themes/bilberry-hugo-theme/layouts/partials/content-type/" .Type ".html")) }}
{{ partial (print "content-type/" .Type) . }}
{{ else }}
{{ partial "content-type/article" . }}
{{ end }}
</div>
{{end}}
{{ end }}
{{ partial "paginator" . }}
{{ end }}