[Resolved] find what page I’m on
Okay, so I know very little PHP, but I did some research and pieced together
$domain = $_SERVER['HTTP_HOST']; $path = $_SERVER['SCRIPT_NAME']; $page_url = "http://" . $domain . $path;
this allows me to echo $page_url and it tells me the URL of the page I am on. This works swimmingly on a static site, but when i use it on wordpress I always get http://www.doamin.com/index.php no matter what page I am on.
Basically I need one header graphic for the Home page and I need a second header graphic for all interior pages. I am doing this with IDs on a H2 tag. I just need a way to tell the script what page I am on means which ID to put in the H2 tag, but if i can’t get $page_url to pull out the right url then I’m not sure how to do this.
I am sure it’s an issue with mod_rewrite or something.
Maybe there is another way of doing this?
Thanks for the help
- The topic ‘[Resolved] find what page I’m on’ is closed to new replies.