diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 30dc63d..20558ba 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -46,9 +46,9 @@
{{ $currentPage := . }}
- {{ range .Site.RegularPages.ByDate }}
+ {{ range (where site.RegularPages.ByDate "Type" "in" site.Params.mainSections )}}
{{ if eq .RelPermalink $currentPage.RelPermalink }}
- {{ if .Next }}
+ {{ if in site.Params.mainSections .Next.Type }}
{{ end }}
- {{ if .Prev }}
-
+ {{ if in site.Params.mainSections .Prev.Type }}
+