Skip to content

Instantly share code, notes, and snippets.

@Rarst
Last active January 28, 2020 02:51
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Rarst/2345029 to your computer and use it in GitHub Desktop.
Save Rarst/2345029 to your computer and use it in GitHub Desktop.
Walker class for WordPress custom menu integration in Twitter Bootstrap navbar
@milleja46
Copy link

Hey just tried to use the walker on my site but it didn't seem to work..... I was trying to use it on demo.zatrii.tk , it seems like it recieves all the classes but doesn't receive the animation and actual dropdown from bootstrap. Is there a reason this might happen?

@Rarst
Copy link
Author

Rarst commented Jul 19, 2012

@milleja46 don't foget you need to load dropdown script from Bootstrap for that. My code has enqueue call for it, but you need to have it somewhere (like in your theme) and registered to bootstrap-dropdown handle.

@milleja46
Copy link

Hrmm didn't think about that, but I thought the js was already in included since I downloaded a custom verison from the site that should've included it in the js file

@milleja46
Copy link

Have I missed loading anything thbat bootstrap needs that might cause it not to run?

@Rarst
Copy link
Author

Rarst commented Jul 19, 2012

@milleja46 please refer to Bootstrap docs as linked above. For dropdowns to work you need their dropdown script and jQuery loaded.

@milleja46
Copy link

Well I've loaded both and it seems not to of effected it in anyway, yes it's loading and showing the proper tags but the dropdown isn't showing

@Rarst
Copy link
Author

Rarst commented Jul 19, 2012

@milleja46 I see dropdowns working on your site (link you posted above) right now...

@milleja46
Copy link

What browser? I have both chrome and firefox and neither show it

@Rarst
Copy link
Author

Rarst commented Jul 19, 2012

@milleja46 Chrome, Firefox, Opera, whatever works:

Imgur

@milleja46
Copy link

Hrmm I see what happens you have to click for it to work, is there not a way to change it to hover for the dropdown to work?

@Rarst
Copy link
Author

Rarst commented Jul 19, 2012

@milleja46 that's design choice of Bootstrap for compatibility with touch screens. You probably can work with JS to adjust, but not my area.

@milleja46
Copy link

Ehh I think I'll just leave it as is, it works and right now that's all I care about....I'm just glad it works now so I can continue designing the rest of the theme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment