Created
June 26, 2012 15:39
-
-
Save davekuhar/2996504 to your computer and use it in GitHub Desktop.
Add function to enable conditional for eg. if (is_post_type('custom-post-type'))
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
| function is_post_type($type){ | |
| global $wp_query; | |
| if($type == get_post_type($wp_query->post->ID)) return true; | |
| return false; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment