Okay
  Public Ticket #345247
Nav Menu Dropdown Arrows
Closed

Comments

  • Jason started the conversation

    How can I override this function in my child theme's functions.php, so that the arrows display even while using the ascend skin?

    //dropdown arrows
    class Nectar_Arrow_Walker_Nav_Menu extends Walker_Nav_Menu {
    function display_element($element, &$children_elements, $max_depth, $depth=0, $args, &$output) {
    $id_field = $this->db_fields['id'];
    global $options;
    $theme_skin = (!empty($options['theme-skin']) && $options['theme-skin'] == 'ascend') ? 'ascend' : 'default';

    if (!empty($children_elements[$element->$id_field]) && $element->menu_item_parent == 0 && $theme_skin !='ascend') {
    $element->title = $element->title . '';
    $element->classes[] = 'sf-with-ul';
    }

    if (!empty($children_elements[$element->$id_field]) && $element->menu_item_parent != 0) {
    $element->title = $element->title . '';
    }

    Walker_Nav_Menu::display_element($element, $children_elements, $max_depth, $depth, $args, $output);
    }
    }

    I know how to edit the function in the parent file, but I dont want to lose the function during furutre updates.

    Thank you.


  •  1,071
    ThemeNectar replied

    Hey Jason,

    This can't be editied in a child theme yet, but I'll add it in the next release :)

    Cheers