如何在typecho中的文章页面获得当前页面分类的缩略名??

WBOY
Release: 2016-06-06 20:46:44
Original
1784 people have browsed it

如题。如何在typecho中的文章页面获得当前页面分类的缩略名??还有当前分类的名称

回复内容:

如题。如何在typecho中的文章页面获得当前页面分类的缩略名??还有当前分类的名称

楼上不够简洁

<code class="lang-php">// 当前分类缩略名
echo $this->category;

// 当前分类名
$this->category(',', false);
</code>
Copy after login

<code>$categories = $this->categories;
foreach($categories as $cate) {
    echo $cate['slug'];
    echo $cate['name'];
}
</code>
Copy after login

应该是这样的..

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!