Last active
June 14, 2020 12:11
-
-
Save hideack/3b1e4d0be96b27f8560de6578251eae3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function change_title_tag( $title ) { | |
//条件分岐タグ等を使ってページにより $title を変更する処理 | |
if (is_date()) { | |
$title = get_the_title($title) . " | " . get_bloginfo('name'); | |
} | |
return $title; | |
} | |
add_filter( 'pre_get_document_title', 'change_title_tag' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment