The menu walker for off-canvas menus was checking for whether the
element was the hotel page ID and if so removing all the child
elements for the entire navigation object - it was instead meant
to remove only those which were children of the Hotel Page. This
is now fixed.
class Glm_Theme_Off_Canvas_Walker extends Walker_Nav_Menu {
function display_element( $element, &$children_elements, $max_depth, $depth = 0, $args, &$output ) {
if ( HOTEL_PAGE_ID == $element->object_id ) {
- $children_elements = null;
+ $children_elements[ $element->ID ] = null;
}
$element->has_children = ! empty( $children_elements[ $element->ID ] );
$element->classes[] = ( $element->current || $element->current_item_ancestor ) ? 'active' : '';