Site logo

Archived topic

Remove arrow dropdown in menu

9 replies · Started by Fabien on April 10, 2020

Viewing posts 1–10 of 10

Hi there,

Is there a function (not css display:none please) to remove the dropdown arrow in the menu ?

Thanks,

Fabien

Hi there,

Would this CSS work for you?

.dropdown-menu-toggle:before {
    content: none;
}

Not really as it still loads the svg code....

Try this:

remove_filter( 'nav_menu_item_title', 'generate_dropdown_icon_to_menu_link', 10, 4 );

Tom, how about mobile menu? They still exist there.

Tom, how about mobile menu? They still exist there.

Any chance you can link us to the site/page in question to check?

If you must keep it private, can you open a new topic about this? So you can use the private information text field. Thank you.

In fact, SVG dropdown icons exist as before, in all navigation places.
I used this to force removing:

add_action( 'after_setup_theme', 'tu_remove_svg_dropdown_icons' );
function tu_remove_svg_dropdown_icons() {
  remove_filter( 'nav_menu_item_title', 'generate_dropdown_icon_to_menu_link', 10, 4 );
}

The deal is not to remove whole SPAN.dropdown-menu-toggle, which is useful, but SVG node only.
So, can we override generate_get_svg_icon function or $icon* variable as empty only at this point?

*\wp-content\themes\generatepress\inc\structure\navigation.php:419 (v. 3.0.3)

Thank you Elvin

No problem. :)

This archived topic is closed to new replies.