the_category()函數(shù)的作用是以鏈接形式顯示指定文章ID的分類
語法結(jié)構(gòu)
<?php the_category($separator, $parents, $post_id); ?>
參數(shù)
$separator 指定間隔符號,常用的有 (?)、(>)、(| )、(-);
$parents 分類顯示方式,兩個值multiple和single;
$post_id 文章的ID號;
實例
<?php the_category('|'); ?>
<?php the_category( '> ' ); ?>