[prisna-google-website-translator]
wp 调取二级分类下的三级类
<?php
                                    
                                        $categories =  get_categories('child_of=1&depth=0&hide_empty=0&orderby=id&order=asc');   
                                        foreach ($categories as $category) {  
                                            $now_cat = $category->term_id;
                                            $cat_name = $category->cat_name;
                                            $cat_id = $category->cat_ID;
                                    ?> 
                            <a href="<?php echo get_category_link($category); ?>" title="<?php echo $cat_name; ?>" id="nav_<?php echo $cat_id; ?>">
                                <div class="icon iconfont icon-jia"></div>
                                <div class="tt">
                                    <?php echo $cat_name; ?>
                                </div>
                            </a>
                            <?php }?>
暂无评论

发送评论 编辑评论


				
上一篇
下一篇