Conversation
supportIn wp-content/plugins/gecka-submenu/models/Submenu.php line 159 find: // top parent page is the top level element else if( $submenu === 'top' ) { global $post, $wp_query; if( ( is_a($post, 'stdClass') || is_a($post, 'WP_Post') ) && (int)$post->ID ) { if( $submenu = $this->get_top_ancestor ($wp_query->get_queried_object_id(), $menu_items, $_type) ) $submenu = $submenu->ID; } } replace with: // top parent page is the top level element else if( $submenu === 'top' ) { global $post, $wp_query; if( ( is_a($post, 'stdClass') || is_a($post, 'WP_Post') ) && (int)$post->ID ) { if( $submenu = $this->get_top_ancestor ($wp_query->get_queried_object_id(), $menu_items, $_type) ) $submenu = $submenu->ID; } } // parent page is the top level element else if( $submenu === 'parent' ) { global $post, $wp_query; $allants = get_post_ancestors( $post );// all ancestors // direct parent is first ancestor $submenu = $this->get_associated_nav_menu_item($allants[0], $menu_items, $_type); } https://wordpress.org/plugins/gecka-submenu/
No comments were stored for this source.