<?php $args=array( 'type' => 'post', 'child_of'=> $catid01, 'parent' => $catid01, 'orderby' => 'ID', 'order' => 'ASC', 'hide_empty'=>'0', 'hierarchical' => 1, 'exclude' => '', 'include' => '', 'number' => '', 'pad_counts' => false ); $categories=get_categories($args); $r=1; foreach($categories as $category) {?> <li><a href="<?php echo get_category_link( $category->term_id );?>"><?php echo $category->name;?></a></li> <?php $r++; if($r>15) break; } ?>
$catid01 是需要调用的 栏目id