# Show active menu for kind page?

**URL:** <https://discourse.gohugo.io/t/show-active-menu-for-kind-page/17829>\
**Category:** support\
**Created:** [March 28, 2019, 4:07pm UTC](https://discourse.gohugo.io/t/show-active-menu-for-kind-page/17829 "2019-03-28T16:07:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![joshmorel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/joshmorel/32/8249_2.png) [@joshmorel](https://discourse.gohugo.io/u/joshmorel)\
**Post date:** [March 28, 2019, 4:07pm UTC](https://discourse.gohugo.io/t/show-active-menu-for-kind-page/17829/1 "2019-03-28T16:07:41Z")

</div>

Thanks for the workaround. I do agree that the documentation is not clear or the code is not working for single pages.

The docs and example for `sectionPagesMenu` works for Home (/), and sections (e.g. /posts/) and section pages (e.g. /posts/my-post-title/) but not for something like (/about/).

The docs for `.IsMenuCurrent` [IsMenuCurrent | Hugo](https://gohugo.io/functions/ismenucurrent/#readout) states:

> `.IsMenuCurrent` is a method in `Page` object returning a _boolean_ value. It returns `true` if the PAGE is the same object as the `.Page` in MENUENTRY in a given MENU.

Why then does a menu entry for `/about/` not return true for the page `/about/`? I tried to troubleshoot but I got a bit lost in the codebase.

---

<div class="post-metadata">

**Author:** ![zwbetz](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/zwbetz/32/16088_2.png) [@zwbetz](https://discourse.gohugo.io/u/zwbetz)\
**Post date:** [March 28, 2019, 4:37pm UTC](https://discourse.gohugo.io/t/show-active-menu-for-kind-page/17829/2 "2019-03-28T16:37:54Z")

</div>

@joshmorel Here’s one solution to this

> [@Another way to make a menu item active](https://discourse.gohugo.io/t/another-way-to-make-a-menu-item-active/17029):
>
> I ran into a scenario recently where my menu item would be active when viewing my blog posts list page, but not when viewing an individual blog post. As an example, let’s say my config.toml menu looks like: [menu] [[menu.nav]] name = "Home" url = "/" weight = 1 [[menu.nav]] name = "Blog" url = "/post/" weight = 2 The “Blog” menu item is active when viewing the list page URL: /post/ But not when viewing a single page URL: /post/some-blog-post/ I solved it checki…

---

<div class="post-metadata">

**Author:** ![joshmorel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/joshmorel/32/8249_2.png) [@joshmorel](https://discourse.gohugo.io/u/joshmorel)\
**Post date:** [March 29, 2019, 1:47pm UTC](https://discourse.gohugo.io/t/show-active-menu-for-kind-page/17829/3 "2019-03-29T13:47:57Z")

</div>

Thanks for sharing @zwbetz

I must not know how to discourse. Why was my reply created as a separate thread and not just a reply to [.IsMenuCurrent returns false for single pages](https://discourse.gohugo.io/t/ismenucurrent-returns-false-for-single-pages/13970/8)?

---

<div class="post-metadata">

**Author:** ![zwbetz](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/zwbetz/32/16088_2.png) [@zwbetz](https://discourse.gohugo.io/u/zwbetz)\
**Post date:** [March 29, 2019, 2:01pm UTC](https://discourse.gohugo.io/t/show-active-menu-for-kind-page/17829/4 "2019-03-29T14:01:26Z")

</div>

I moved it. Since that thread was already marked as solved, I moved your question to a new thread, and linked the old thread.

---

<div class="post-metadata">

**Author:** ![joshmorel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/joshmorel/32/8249_2.png) [@joshmorel](https://discourse.gohugo.io/u/joshmorel)\
**Post date:** [April 1, 2019, 4:11pm UTC](https://discourse.gohugo.io/t/show-active-menu-for-kind-page/17829/5 "2019-04-01T16:11:30Z")

</div>

Ah okay thanks for the explanation. I thought I did something weird.
