Skip to content

Instantly share code, notes, and snippets.

@iammerrick
Created June 17, 2010 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iammerrick/442371 to your computer and use it in GitHub Desktop.
Save iammerrick/442371 to your computer and use it in GitHub Desktop.
function is_news()
{
global $wp_query;
$categories = get_the_category($wp_query->post->ID);
foreach($categories as $category)
{
if($category->cat_ID)
{
return true; // Kenneth will this exit the is_news function and return true or just the foreach closure?
}
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment