投稿タグは便利ですね。
/* 記事に指定されているタグを配列として取得 */
$posttags = get_the_tags();
$my_array = array();
if ($posttags) {
foreach($posttags as $tag) {
$my_array[] = $tag->name ;
}
}
$str_my_array = mb_strtolower(implode(",", $my_array));
/* 振り分けたい条件を指定 */
$match = mb_strtolower('/りんご|オレンジ/');
if(preg_match($match,$str_my_array)){ ?>
タグに条件のいずれかが合致した場合の表示内容
<?php } else { ?>
合致しなかった場合の表示内容
<?php } ?>


