From f69631408209b2734686f9fb29cd8a3ea50d89c7 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Thu, 17 Sep 2015 16:27:22 -0400 Subject: [PATCH] Created the is_post_type function! For custom type conditionals --- functions.php | 5 +++++ 1 file changed, 5 insertions(+) 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() { -- 2.17.1