Dyanmic Title Problem

Status
Not open for further replies.
2 comments
PHP:
$url = "http" . ((!empty($_SERVER['HTTPS'])) ? "s" : "") . "://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];

$page->variables = array('title' => "Your title -". substr(strrchr($url, '/'),1));

$url is your current url and the substr gets everything after the last / (slash)

You may try to customize it more like using str_replace to replace the "+" with " " and substr ".htm"
so the title must be perfect.
 
Did you declare {post_name} in any of the PHP files? Also, did you make sure that {post_name} is actually being replaced at some point?
 
Status
Not open for further replies.
Back
Top