メモ Changing the title of the categories archive pages

 
add_filter(‘tc_category_archive_title’ , ‘my_cat_title’);
function my_cat_title($title) {
 return ‘My archives title for : ‘;
}
 
add_filter(‘tc_category_archive_header_content’ , ‘my_cat_heading’);
function my_cat_heading($content) {
 global $wp_query;
 if ( ‘my_cat_name’ != $wp_query -> query_vars[‘category_name’] )
return $content;
return ‘<h1 class=”my_custom_class”>My custom title</h1>’;
}
 
横浜WordPressスクール

About the author: 横浜WordPressスクール 鎌田裕二