# New navigation - Sage 9

**URL:** https://discourse.roots.io/t/new-navigation-sage-9/11113
**Category:** sage
**Tags:** bootstrap4, sage9
**Created:** 2017-12-11T10:11:15Z
**Posts:** 4

## Post 1 by @dghez — 2017-12-11T10:11:15Z

Hi everyone!  
I’m running on `Sage 9 - boostrap beta2` and I don’t find a way to modify the actual `navigation`. The default one is fine for me more or less, I just need to modify the markup a little to add classes etc for changing style and behaviour.  
I tried to look into a lot of files, even with “search in all files” with a class of the item but I didn’t get me any results. Where the hell is the navigation defined? :joy:  
Which way is better, modify the current one OR create a new walker and implement it? In the case of create a `custom walker` in which file is the best way to do that?  
Hope someone can help me.  
Thanks everyone in advance :slight_smile:

---

## Post 2 by @ben — 2017-12-11T16:20:55Z

> [@dghez](#):
>
> I tried to look into a lot of files

> [@dghez](#):
>
> Where the hell is the navigation defined? :joy:

The file named `header.blade.php`.

> <https://github.com/roots/sage/blob/2cae6148d59b81494e797dd07f60ea9e128da740/resources/views/partials/header.blade.php>

> [@dghez](#):
>
> Which way is better, modify the current one OR create a new walker and implement it? In the case of create a custom walker in which file is the best way to do that?

We have no idea what you are trying to accomplish. :slight_smile:

---

## Post 3 by @dghez — 2017-12-11T16:52:15Z

> [@ben](#):
>
> The file named header.blade.php.

Yeah I found that, it was obvious :yum: but where is `wp_nav_menu` declared?

I mean, where is the header built? The `blade if statement` to me means: if you have a primary navigation (the one you set as primary in admin) add it with a container with `nav` as class of the container.  
But my question is this: now with the default markup the header looks like the photo but where does it take the `menu-item` class for example?

 ![45](https://discourse.roots.io/uploads/default/original/2X/a/a894be96d0d578f8a9785377c2fe74455df88627.png)

> [@ben](#):
>
> We have no idea what you are trying to accomplish. :slight_smile:

More or less create a new menu, but only **change the markup** of the current one. Something like add `active` class, add a cta to open a modal and change the style / behaviour of the mobile version.

Hope everything is clear :slight_smile:

**_EDIT:_** if the actual nav structure is the default of wordpress and I need to recreate that, which is the best place to do that? I red somewhere you discourage a lot to write stuff in the `function.php` (for CPT and Taxonomies I created a plugin) and in this case a simply way yo achieve that without register a `new walker` is maybe go with `wp_get_nav_menu_items`… but where?

---

## Post 4 by @ben — 2017-12-11T17:44:28Z

> [@dghez](#):
>
> Yeah I found that, it was obvious :yum: but where is wp\_nav\_menu declared?

> [@dghez](#):
>
> But my question is this: now with the default markup the header looks like the photo but where does it take the menu-item class for example?

`wp_nav_menu` is a WordPress core function. `menu-item` comes from WordPress core.

This question might be better suited for [https://wordpress.stackexchange.com/](https://wordpress.stackexchange.com/) as it’s not related to Sage or Blade :slight_smile:
