Need some help with a code for the title

So, i’ve found a code that changes the "Title" but, for example my website reads "index.php" as "first/home page" But, its shows "Index | ChrisBeats.Com" instead of that i want it to be called "Home | ChrisBeats.Com"

Example: chrizzle.nl

I tried something but it doesnt seem to work:

Code:

<?php $siteName = 'ChrisBeats.com';

$fileName = $_SERVER['PHP_SELF'];
$fileName = explode('.', $fileName);
$pageName = $fileName[0];
$pageName = str_replace('/', '', $pageName);

if ($fileName = 'index.php') {
        echo "print Home" | $siteName";";
} else {
        echo "print ucfirst($pageName) . " | $siteName";";
}
?>


i want to make a exception if the file is "index.php" and set a manual title,
if the file isnt "index.php" it will use the code instead

Original code:

Code:

<?php $siteName = 'ChrisBeats.com';

$fileName = $_SERVER['PHP_SELF'];
$fileName = explode('.', $fileName);
$pageName = $fileName[0];
$pageName = str_replace('/', '', $pageName);

print ucfirst($pageName) . " | $siteName"; ?>


Could anyone help me with this?
Thanks in advance

View full post on Tycoon Talk

, , , ,

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Get Adobe Flash playerPlugin by wpburn.com wordpress themes


RSS Site FeedRSS Site Feed

© 1992-2011 DC2NET™, Inc. All Rights Reserved