I need to change the page title of
This is what I see when I check the coding of the page:
Please help me change the page name to News instead of Category: News
CodePudding user response:
Place this code in your functions.php
file
function change_category_page_title( $title ) {
$title_arr = explode(':', $title);
if ( count($title_arr) > 0 ){
if(array_key_exists(1, $title_arr)) {
return $title_arr[1];
}
}
return $title;
}
add_filter( 'pre_get_document_title', 'change_category_page_title', 9999 );
CodePudding user response:
Try with this CSS
.category-news h1.page-title span {
font-size: 42px;
}
.category-news h1.page-title {
font-size: 0;
}
Hope it works