get URL info for page titles
-
Hi all,
OK, hopefully this will make sense and someone can help me out!
I’ve got a URL https://www.mydomain.com/category/talks/
and https://www.mydomain.com/2010/07/29/What I’d like to do is this:
If you click https://www.mydomain.com/category/talks/ then the H1 title tag shows Talks.
If you click https://www.mydomain.com/2010/07/29/ then the H1 title tag shows 29th July 2010
I tried
$pageURL=''; $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; $filename = basename($pageURL); echo '<h1 class="listings_archive">'.$filename.'</h1>';
This works for talks but for the date link just shows 29. Is there a way around this?
Many thanks in advanced!
- The topic ‘get URL info for page titles’ is closed to new replies.