コメントテンプレートの分岐(使い分け)
-
コメントテンプレートをカテゴリーによって使い分けたいのですが、
<?php
if(is_comments()&&in_category(’27’)){
include (TEMPLATEPATH . ‘/comments_a.php’); return;
}
?>カテゴリー27のとき、comments_a.php を使うというようにしたくて、comments.php の頭に上記のように書いたのですが、
Fatal error: Call to undefined function is_comments() in /home/example/www/wp-content/themes/example/comments.php on line 2
と出てしまいました。
どの様にすればよろしいのでしょうか?
6件の返信を表示中 - 1 - 6件目 (全6件中)
6件の返信を表示中 - 1 - 6件目 (全6件中)
- トピック「コメントテンプレートの分岐(使い分け)」には新たに返信することはできません。