add custom title to Classic Blogger FTP label pages
On Classic Blogger templates for FTP, label pages do not have custom page titles.This PHP code is for adding the label name to the page title.
<title><$BlogPageTitle$>
<?php
// this checks to see if you are on a label page
if(strstr($_SERVER['PHP_SELF'],'/blog/labels/')) {
// this generates the label name
$FilePath = explode("/", $_SERVER['PHP_SELF'] );
$FilePath = array_reverse($FilePath);
$LabelName = explode(".", $FilePath[0]);
echo ": ". $LabelName[0];
}
?>
</title>
Labels: code