Support » Theme: Vega » top level link converted to #

  • emgraphics

    (@emgraphics)


    Hi – I have a simple menu on the top of the page. However, when I added some sub-menu items to drop down, the main link was converted to a #. I want that link to work also. How do I fix this? thanks

Viewing 1 replies (of 1 total)
  • jarektheme

    (@jarektheme)

    Hi there,

    Thank you for getting in touch with us.

    Vega uses Bootstrap dropdown nav menu in parent menu items which replace all parent href attribute with hash #.

    The only way to change it is by modification of includes/wp_bootstrap_navwalker.php file. Please find these lines:

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

    and replace with this:

    $atts['href'] = ! empty( $item->url ) ? $item->url : '';

    Please note, however that these changes will be lost after next theme update.

    Hope that helps. Thank you for your time in this.

    Best regards

Viewing 1 replies (of 1 total)
  • The topic ‘top level link converted to #’ is closed to new replies.