salcode / bootstrap-genesis

WordPress Genesis Child Theme setup to use Bootstrap, Sass, and Grunt
MIT License
184 stars 63 forks source link

Bootstrap Menu shouldn't be applied to widgets #44

Closed bryanwillis closed 9 years ago

bryanwillis commented 9 years ago

The wordpress menu widget shouldn't adopt the bootstrap menu. The container class is being added to widget menus which causes issues because if a widget menu is being used in the primary sidebar for example, the container class is being nested in another container class which isn't good

`

`

salcode commented 9 years ago

@bryanwillis, I agree this is a good idea, thanks.

Currently, the Bootstrap markup is applied with the custom nav walker wp_bootstrap_navwalker.

This is applied in lib/nav.php based on the conditional

if (
    'primary' === $args['theme_location'] ||
    'secondary' === $args['theme_location']
) {

I'm guessing this conditional will need to include a check that the nav is NOT in a widget.

I'm also open to other ideas for implementing this.