I think I stumbled onto a function that will show what current page is loaded (index.php, single.php, etc.), but now that I actually need, I can’t find it anywhere.
This is what I’ve used in the past, but it’s pretty weird way to go about things.
// Get current page (easier way?)
$curstr = $_SERVER[‘QUERY_STRING’];
$curstr = explode(“&”,$curstr);
$curpage = explode(“=”,$curstr);
$curpage = $curpage;
Any help would be appreciated,
- The topic ‘What is the current page?’ is closed to new replies.