我有以下代码:
<div id="content">
<?php
$args = array(
'orderby' => 'id',
'hide_empty'=> 0,
'child_of' => 10, //Child From Boxes Category
);
$categories = get_categories($args);
foreach ($categories as $cat) {
echo '<div class="one_fourth">';
echo '<h1 class="valignmiddle uppercase title-bold">'.$cat->name.'<img src="'.$cat->term_icon.'" alt="" class="alignleft"/>'.'<br />'.'<span class="solutions">'.$cat->description.'</span>'.'</h1>';
echo '<br />';
echo '<span>';
//How do I get these child post titles here
echo '</span>';
echo '</div>';
}
?>
<div class="clear"></div>
<hr />
<div class="clear"></div>
</div><!-- #content -->
我正在使用它从父框类别中获取类别,并从子类别中显示名称和图标。如何显示子类别的帖子标题?