T
T
teodor7teodor72016-04-13 15:19:22
Bootstrap
teodor7teodor7, 2016-04-13 15:19:22

How to make a menu so that the main menu category is clickable on bootstrap for wordpress?

I did it like this https://github.com/twittem/wp-bootstrap-navwalker then added a hover dropout. The problem is that now

--О нас
---История
---Клиенты

When you click on About us, the link disappears and only a submenu opens. How to make a transition?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
teodor7teodor7, 2016-04-13
@teodor7teodor7

in the plugin https://github.com/twittem/wp-bootstrap-navwalker
we change the piece with this

if ( $args->has_children && $depth === 0 ) {
        $atts['href']   		= $item->url;
      
                $atts['data-hover']     = 'dropdown';
        $atts['class']			= 'dropdown-toggle';
        $atts['aria-haspopup']	= 'true';
      } else {
        $atts['href'] = ! empty( $item->url ) ? $item->url : '';
      }

use https://github.com/CWSpear/bootstrap-hover-dropdown
The menu result works on hover and the main category is clickable.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question