Created
October 1, 2013 15:45
-
-
Save efarem/6780526 to your computer and use it in GitHub Desktop.
WordPress function to tell if you're on a blog page, current page is a blog page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Are we on a blog page? | |
* | |
* @return bool | |
**/ | |
function is_blog() | |
{ | |
return (is_post_type_archive('post') || is_author() || is_category() || is_home() || is_singular('post') || is_tag()) ? true : false ; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment