Skip to content

Instantly share code, notes, and snippets.

View grantnorwood's full-sized avatar

Grant Norwood grantnorwood

View GitHub Profile
@grantnorwood
grantnorwood / is_blog_page.php
Created August 17, 2012 17:52
WordPress' missing is_blog_page() function. Determines if the currently viewed page is one of the blog pages, including the blog home page, archive, category/tag, author, or single post pages.
<?php
/**
* WordPress' missing is_blog_page() function. Determines if the currently viewed page is
* one of the blog pages, including the blog home page, archive, category/tag, author, or single
* post pages.
*
* @see http://core.trac.wordpress.org/browser/tags/3.4.1/wp-includes/query.php#L1572
*
* @return bool