Skip to content

Instantly share code, notes, and snippets.

@davekuhar
Created June 26, 2012 15:39
Show Gist options
  • Select an option

  • Save davekuhar/2996504 to your computer and use it in GitHub Desktop.

Select an option

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'))
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