Тренеры направлений Pole Dance

О направлении | Расписание занятий | Список всех тренеров клуба


[insert_php]
error_reporting(E_ALL ^ E_NOTICE);
$currenttag="Pole Dance";
$trenerlist=array();
$paramarr = array(
'post_parent' => '4207',
'post_type' => 'page',
'numberposts' => -1,
'post_status' => 'any',
'orderby'=> 'menu_order desc',
order=>'ASC'
);
function maketrenerlist($data, $pagetag) {
foreach ($data as $key => $row) {
$posttags = get_the_tags($key);
if ($posttags) {
foreach($posttags as $tag) {
if($pagetag==$tag->name) {
$trenerlist[$row->post_title]=$row;

}

}}}
ksort($trenerlist);
return $trenerlist;
}

$childrens = get_children( $paramarr );
if( $childrens ){
$trenerlist=maketrenerlist($childrens, $currenttag);

}
$counter=0;

foreach($trenerlist as $spisok) {
echo "

";
}
$counter++;
echo "
";flush();
[/insert_php]