public static get_page_type ( ) : string | boolean | ||
return | string | boolean | Type of current page or false if unsupported. |
public static function get_page_type()
{
if (is_front_page()) {
return 'front_page';
}
if (is_category() || is_tag()) {
return 'groups';
}
if (is_archive() && !is_author()) {
return 'archives';
}
if (is_page()) {
return 'pages';
}
if (is_singular()) {
return 'posts';
}
return false;
}