Created
August 28, 2011 19:14
-
-
Save ninetwentyfour/1177074 to your computer and use it in GitHub Desktop.
If is_page() With Regular PHP - blogpost
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$baseurl = 'http://www.example.com'; //set the base url of the site | |
$pageYouWant = $baseurl."/the-rest-of-the-url"; //add the rest of the url you want to check against | |
$currentPage = $baseurl.$_SERVER['REQUEST_URI'];// this gets the current page url | |
if($pageYouWant==$currentPage) { | |
//do something | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment