sage icon indicating copy to clipboard operation
sage copied to clipboard

Roots_Navbar_Nav_Walker doesnt show custom css classes

Open taniot opened this issue 14 years ago • 13 comments

Hi, I've been trying to assign a custom css class to menu (via CSS Classes (optional) in the admin area).

Not working wp_nav_menu(array('theme_location' => 'menuname', 'walker' => new Roots_Navbar_Nav_Walker(), 'menu_class' => 'nav'));

Working wp_nav_menu(array('theme_location' => 'menuname', 'walker' => new Walker_Nav_Menu(), 'menu_class' => 'nav'));

Is it possible? I'm using the latest roots version.

Thanks a lot

Regards :)

taniot avatar Apr 24 '12 13:04 taniot

hmm, thought i fixed this with 9cc8f62d3ebfa059c240058523149fa1476033e9. will look into it soon, thx for the issue

retlehs avatar Apr 24 '12 16:04 retlehs

thx ben :)

taniot avatar Apr 28 '12 07:04 taniot

working over here, you sure you have that commit i referenced above?

retlehs avatar Apr 30 '12 01:04 retlehs

yep, I've downloaded it right now (just in case) but nothing, there's not the custom class.... current settings are

url label external link class

:)

taniot avatar Apr 30 '12 07:04 taniot

ahh, custom class items themselves in the WP admin (which need to be enabled via the screen options). will check it out again

i thought you meant the menu_class set on wp_nav_menu :)

retlehs avatar Apr 30 '12 07:04 retlehs

ok thx :)

taniot avatar Apr 30 '12 07:04 taniot

Ive tried adding a class to one of the links in my menu and the class is not being applied.

Regards, Darren

expertpixels avatar May 05 '12 10:05 expertpixels

I'm also having the same issue. I'm trying to add a Bootstrap horizontal divider to my dropdown menu.

Thanks!

sethta avatar May 06 '12 02:05 sethta

It would be lovely to be able to use the horizontal divider.

bywire avatar May 07 '12 16:05 bywire

Same issue experienced. I'd like to use this to add btn classes to my drop-down menus

nbeecroft avatar May 07 '12 20:05 nbeecroft

"It would be lovely to be able to use the horizontal divider."

Try adding this to your bootstrap css.. or other css file: (Replace the image with your own divider)

.navbar .nav > li { background: url("../img/menu_sep.png") no-repeat scroll 100% 50% transparent; display: block; float: left; }

expertpixels avatar May 08 '12 00:05 expertpixels

fixed with d4ec36331bb98baf52b9d522ee4498e55617cc61

retlehs avatar May 09 '12 05:05 retlehs

Thanks Ben :) your a champion !! appreciate your on-going support :)

For those who are trying this be sure to add the "!important" statement to your css class in your app.css or bootstrap file.. here's what i mean:

.nav_aff_link a { color: #E5E516 !important; }

expertpixels avatar May 09 '12 05:05 expertpixels