WordPressユーザーのbaserCMS覚え書き


記事が属するカテゴリー名を出力する

WordPress

the_category()

テンプレートタグ/the category - WordPress Codex 日本語版

baserCMS(3系)

$this->Blog->category( $post,[$options] )

[category] 記事が属するカテゴリ名を出力する|baserCMS 3系関数リファレンス

メモ

カテゴリー名だけを出力したい(=リンクを埋めたくない)とき、baserCMSでは、関数リファレンスにもあるように

<?php $this->Blog->category( $post, array( 'link' => false ) ) ?>

というコードで実装することができます。

WordPressの場合、the_category() はデフォルトでリンクつきのテキストを出力するため get_the_category() で代用するとよいでしょう。

Function Reference/get the category « WordPress Codex