You shouldn’t return childpages, you should add variable $ret="";
and in each cycle append
foreach(...){
$ret.="<div...";
}
and return it
In general you should always return a string(or number) in such functions
You shouldn’t return childpages, you should add variable $ret="";
and in each cycle append
foreach(...){
$ret.="<div...";
}
and return it
In general you should always return a string(or number) in such functions