WordPressユーザーのbaserCMS覚え書き


キーワードを取得する

WordPress

該当する関数(テンプレートタグ)はありません。

baserCMS(2系)

$bcBaser->getKeywords()

[getKeywords] キーワードを取得する|baserCMS 2系関数リファレンス

baserCMS(3系)

$this->BcBaser->getKeywords()

[getKeywords] キーワードを取得する|baserCMS 3系関数リファレンス

メモ

baserCMSの[システム設定]-[サイト基本設定]-[サイト基本キーワード]にて設定した内容を取得できます。ただし、サイト基本キーワードのテキストのみを純粋に取得するので、ページの head セクションにて出力したい場合は meta タグを使って適切にマークアップする必要があります。

$this->BcBaser->metaKeywords()(3系)
$bcBaser->metaKeywords()(2系)を使った場合

《コード》(3系の場合)

<?php $this->BcBaser->metaKeywords() ?>

《出力結果》

<meta name="keywords" content="baser,CMS,コンテンツマネジメントシステム,開発支援" />

$this->BcBaser->getKeywords()(3系)
$bcBaser->getKeywords()(2系) を使った場合

《コード》(3系の場合)

<?php echo $this->BcBaser->getKeywords() ?>

《出力結果》

baser,CMS,コンテンツマネジメントシステム,開発支援