WordPressで特定のタグを表示しない方法。
「tagname」を部分を非表示にしたいタグスラッグに変更。
<?php $tags = get_the_tags( $post->ID ); $separator = ', '; $output = ''; if($tags){ foreach($tags as $tag) { // dpm($tag) here by uncomment you can check tag slug which you want to exclude if($tag->slug != "tagname"){ // replace yourtag with you required tag name $output .= '<a href="'.get_tag_link( $tag->term_id ).'" title="' . esc_attr( sprintf( __( "View all posts tagged %s", 'tracks' ), $tag->name ) ) . '">'.$tag->name.'</a>'.$separator; } } echo trim($output, $separator); } ?>