wordpress自定the_category的输出结构

通过WordPress的过滤器the_category来自定义输出内容。方法很简单,但是很实用。以下是一个示例代码: function custom_the_category($thelist, $separator = '', $parents = '') { // 获取当前文章的所有分类 $categories = get_the_category(); if (empty($categories)) { return $thelist; …