# Template conditionals - how to exclude tags & category pages from menu

**URL:** <https://discourse.gohugo.io/t/template-conditionals-how-to-exclude-tags-category-pages-from-menu/12168>\
**Category:** support\
**Created:** [May 28, 2018, 4:35am UTC](https://discourse.gohugo.io/t/template-conditionals-how-to-exclude-tags-category-pages-from-menu/12168 "2018-05-28T04:35:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![prembo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/prembo/32/6065_2.png) [@prembo](https://discourse.gohugo.io/u/prembo)\
**Post date:** [May 28, 2018, 4:35am UTC](https://discourse.gohugo.io/t/template-conditionals-how-to-exclude-tags-category-pages-from-menu/12168/1 "2018-05-28T04:35:55Z")

</div>

I’m working with a Hugo theme at the moment.

At present, the tag & category are included in the page list when generating the menu.

```
 {{ range where .Site.Pages "Type" "!=" "posts" }}
   <li>
     <a href="{{ .Permalink }}">
       {{ .Title }}
     </a>
   </li>
{{ end }} 

```

I would like to extend the above to not only _exclude_ posts, but also tags and categories. What kind of conditional logic or template code will I need to accomplish this please?

Thank you.

---

<div class="post-metadata">

**Author:** ![budparr](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/budparr/32/749_2.png) [@budparr](https://discourse.gohugo.io/u/budparr)\
**Post date:** [May 28, 2018, 9:33pm UTC](https://discourse.gohugo.io/t/template-conditionals-how-to-exclude-tags-category-pages-from-menu/12168/2 "2018-05-28T21:33:44Z")

</div>

> [@prembo](#):
>
> .Site.Pages

Perhaps `.Site.RegularPages` will get you what you want. [Site variables | Hugo](https://gohugo.io/variables/site/#site-variables-list)

---

<div class="post-metadata">

**Author:** ![prembo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/prembo/32/6065_2.png) [@prembo](https://discourse.gohugo.io/u/prembo)\
**Post date:** [May 29, 2018, 5:46am UTC](https://discourse.gohugo.io/t/template-conditionals-how-to-exclude-tags-category-pages-from-menu/12168/3 "2018-05-29T05:46:21Z")

</div>

> [@budparr](#):
>
> Perhaps `.Site.RegularPages` will get you what you want. [Site variables | Hugo](https://gohugo.io/variables/site/#site-variables-list)

That looks exactly like what I’m after - thank you.
