functions.phpに下記を記入します。
function add_class_the_tags($html){
$postid = get_the_ID();
$html = str_replace('<a','<a class="label"',$html);
return $html;
}
add_filter('the_tags','add_class_the_tags',10,1);<a class=”label”>タグ名</a>と出力されます。
functions.phpに下記を記入します。
function add_class_the_tags($html){
$postid = get_the_ID();
$html = str_replace('<a','<a class="label"',$html);
return $html;
}
add_filter('the_tags','add_class_the_tags',10,1);<a class=”label”>タグ名</a>と出力されます。