0
나는 아래 기능을 사용하여 wordpress에서 페이지 제목을 변경합니다. 단일 페이지 (page.php)에서 작업하고 있지만 정적 홈 페이지 나 개별 게시물 (single.php)에서는 작동하지 않습니다.Wordpress에서 페이지 제목을 변경하는 기능
전체 사이트에서이 작업을하려면 무엇을 변경해야합니까?
<?php
function wpse46249_filter_wp_title($title) {
$some_custom_title_content = 'This is added to title';
$custom_title = $title . $some_custom_title_content;
return $custom_title;
}
add_filter('wp_title', 'wpse46249_filter_wp_title');
?>
모든 게시물에 동일한 페이지 제목을 설정 하시겠습니까? –
@HelpingHands, 아니요. 이 코드는 전달 된 원래'$ title'에 무언가를 덧붙이고 있습니다. – rnevius
@ user1609391 ... 이것은 템플릿 문제와 같습니다. – rnevius