Skip to content

Instantly share code, notes, and snippets.

@jwebcat
Created January 24, 2014 08:16
Show Gist options
  • Save jwebcat/8593817 to your computer and use it in GitHub Desktop.
Save jwebcat/8593817 to your computer and use it in GitHub Desktop.
Add is_blog() function to WP
function is_blog () {
global $post;
$posttype = get_post_type($post );
return ( ((is_archive()) || (is_author()) || (is_category()) || (is_home()) || (is_single()) || (is_tag())) && ( $posttype == 'post') ) ? true : false ;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment