Append the date globally to the title on posts, pages

Adding this snippet to the functions.php of your wordpress theme will append the date to the title of your wordpress posts & pages.

 

 

add_filter( 'wp_title', 'append_to_title', 10, 3 );
function append_to_title($title) {
$date = get_the_date();
return $title .= " | ".$date;
}

Be Sociable, Share!

Leave a comment