Typecho默认是将单页面链接显示在导航菜单中,如何将分类添加到导航菜单中?将以下代码加在header.php即可:
<?php $this->widget('Widget_Metas_Category_List')->to($category); ?> <?php while($category->next()): ?> <li<?php if($this->is('category', $category->slug)): ?> class="current"<?php endif; ?>><a href="<?php $category->permalink(); ?>"><?php $category->name(); ?></a></li> <?php endwhile; ?>
发表回复