wordpress输出无链接的分类名称
wordpress吧
全部回复
仅看楼主
level 5
dotamh 楼主
<?php
$nolink_category = get_the_category();
echo $nolink_category[0]->cat_name;
?>
默认的 the_category()是带链接的,这样输出的不带连接且不会换行
2009年08月06日 08点08分 1
level 7
这个帮了我大忙!非常感谢!
2012年11月21日 05点11分 2
level 1
<?php single_cat_title(); ?> 这样的不可以吗
2013年05月11日 09点05分 4
nzj
感谢!
2013年12月01日 06点12分
level 12
话说为嘛不要链接?
2013年05月11日 09点05分 5
有时候感觉有链接麻烦,不需要
2013年09月23日 05点09分
level 7
我也正想找这样的代码呢,感谢楼主分享呵呵
2013年12月01日 12点12分 6
1