From: Laury GvR Date: Thu, 17 Sep 2015 20:27:22 +0000 (-0400) Subject: Created the is_post_type function! For custom type conditionals X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=f69631408209b2734686f9fb29cd8a3ea50d89c7;p=WP-Themes%2Fglmthemes%2Fmountpleasant-theme.git Created the is_post_type function! For custom type conditionals --- diff --git a/functions.php b/functions.php index 5423734..f3000c0 100644 --- a/functions.php +++ b/functions.php @@ -299,6 +299,11 @@ function glm_site_scripts() } +function is_post_type($type){ + global $wp_query; + if($type == get_post_type($wp_query->post->ID)) return true; + return false; +} /* Header for posts*/ function glm_get_background() {