Created
October 6, 2014 01:42
-
-
Save ahmadawais/0ddde36a2bb8c83bd52b to your computer and use it in GitHub Desktop.
Check if it is a particular WordPress page
This file contains 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
/** | |
* @Check if it is a particular WordPress page | |
* @Codex http://codex.wordpress.org/Function_Reference/is_page | |
* | |
*/ | |
if(is_page(42)){ | |
//This runs when page with ID 42 is being displayed | |
} | |
else{ | |
//This runs always except for when the page ID is 42 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment