term_description()からpタグを消す

<head>内のディスクリプションにタームの説明文を載せたかったのでterm_description()で呼び出そうとしたのですが、デフォルトでは<p>で囲んであるので、それを消したい時に使った方法。

<?php
$term_desc = term_description();
$desc = "「" . $term . "」のタグがついている映画の感想記事一覧です。" . strip_tags($term_desc);
?>
strip_tags()文字列から HTML および PHP タグを取り除く

strip_tags()で囲むことによって<p>を消しています。

参考