7. Frontend Hooks

If you even want to make a deeper customization, you can also change the HTML and attributes of the items in the menu.

7.1. Change Link Classes

If you want to add your custom classes on the QuadMenu items, you can use this hook.

add_filter('quadmenu_nav_menu_css_class', 'my_hook_nav_menu_css_class', 10, 4);

function my_hook_nav_menu_css_class($classes = array(), $item, $args, $depth) {

 $classes[] = 'my_custom_class';

 return $classes;

7.2. Change the LESS files

If have not been enough to integrate QuadMenu with your theme, then you can make a radical change in the style.

As we've previously mentioned in the documentation, the QuadMenu style is created dynamically each time the user makes a change in the administration panel.

So if you want to radically change the menu style you’ve to modify the LESS files that are used to create it.

To do this, you have to change the LESS files in the compiler. Thus, you can upload files from your theme and make any changes you think necessary.

add_filter('quadmenu.compiler_files', 'my_hook_compiler_files');

    function my_hook_compiler_files($files) {

        $files = array();
        $files[] = get_template_directory() . '/quadmenu-locations.less';
        $files[] = get_template_directory() . '/quadmenu-widgets.less';

        return $files;

7.3. Change link HTML output

If has not been enough for you, you can hook the HTML output with this filter.

add_filter('quadmenu_nav_menu_start_el', 'my_hook_nav_menu_start_el', 10, 4);

function my_hook_nav_menu_start_el($output = '', $item, $args, $depth) {
 return $output;
add_filter('quadmenu_nav_menu_end_el', 'my_hook_nav_menu_end_el', 10, 4);

function my_hook_nav_menu_end_el($output = '', $item, $args, $depth) {
 return $output;