Created
September 26, 2016 13:52
-
-
Save al5dy/f08af7eb1f1d245816687b71b0c3c808 to your computer and use it in GitHub Desktop.
Проверяем, является ли текущая страница блоговой или нет.
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
function is_page_for_posts() { | |
$result = false; | |
if ( is_home() && ! is_front_page() ) { | |
$page = get_queried_object(); | |
$result = ! is_null( $page ) && $page->ID == get_option( 'page_for_posts' ); | |
} | |
return $result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment