I would like to remove the link to the parent if it has a child, while still keeping the links to the children. I believe this is the section of code to modify, but so far my attempts have only resulted in errors…
function five_print_ancestors_with_child(){
//get ancestors
$result = five_get_ancestors();
if($result){
//loop result from above database query and list child pages of ancestors
foreach ($result as $res){
//prepare ancestor id for wp_list_pages
$ancestor_id = $res->ID;
//get all child and grand child of ancestor page
$children = wp_list_pages(“title_li=&child_of=$ancestor_id&echo=0”);
//if there is children
if($children){
echo ‘