时间:2014-01-26所属栏目: WordPress教程 来源: 热度:
在默认环境下WordPress前台表现出的分类和标签(tag)的描写内容是不支持HTML代码的,这让我们在wordpress主题建造时受到了很大的限定,同时也减弱了网站的页面结果。
WordPress主题中挪用分类和标签(tag)的描写标签:
<?php echo category_description(); ?>
<?php echo tag_description(); ?>
若想让上述标签在编辑功效中支持HTML代码的话,必要在 WordPress主题 中的 functions.php 文件添加下面代码:
remove_filter( 'pre_term_description', 'wp_filter_kses' );
remove_filter( 'pre_link_description', 'wp_filter_kses' );
remove_filter( 'pre_link_notes', 'wp_filter_kses' );
remove_filter( 'term_description', 'wp_kses_data' );