Here is the code to solve the issue:
File: template-functions-post.php
Function: wp_list_pages(args = ”)
Line: 358 (aprox.)
Add next code (into the “foreach” code block):
$page_tree[$page->ID]['parent'] = $page->post_parent;
———————————–
Into the same file:
Function: _page_level_out(…)
Line: 418 (aprox.)
Add next code (into the “foreach” code block):
$current_page = $page_tree[$GLOBALS['id']]['parent'];
if(!($parent == 0 || ($GLOBALS['id'] == $cur_page['parent']) || ($current_parent == $cur_page['parent'])))
continue;
———————
I hope you’ll find it useful. Regards.
—
Diego Lago
I’ve solved this issue modifiying source from function-templates.php. The functions are wp_list_pages and other (I don’t remember that now).
I will post the complete solution when I found the files (I’m not online all the time).
Regards.
—
Diego Lago