# _resolve_home_block_template()

URL: https://chugunov.pro/api-wordpress/functions/_resolve_home_block_template/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: функция.
Появился в версии: 6.0.0.

> Устаревший элемент. Помечен устаревшим с версии 6.2.0.

## Сигнатура

```php
_resolve_home_block_template(): array|null
```

## Описание

Возвращает правильный шаблон для главной страницы сайта.

## Возвращаемое значение

`array|null`

## Исходный код

Файл: `wp-includes/deprecated.php:4617`

```php
function _resolve_home_block_template() {
	_deprecated_function( __FUNCTION__, '6.2.0' );

	$show_on_front = get_option( 'show_on_front' );
	$front_page_id = get_option( 'page_on_front' );

	if ( 'page' === $show_on_front && $front_page_id ) {
		return array(
				'postType' => 'page',
				'postId'   => $front_page_id,
		);
	}

	$hierarchy = array( 'front-page', 'home', 'index' );
	$template  = resolve_block_template( 'home', $hierarchy, '' );

	if ( ! $template ) {
		return null;
	}

	return array(
			'postType' => 'wp_template',
			'postId'   => $template->id,
	);
}
```

## История изменений

- 6.2.0 — Deprecated. Site Editor’s server-side redirect for missing postType and postId query args is removed. Thus, this function is no longer used.
- 6.0.0 — Introduced.

## Связанные

Использует: [`resolve_block_template`](https://chugunov.pro/api-wordpress/functions/resolve_block_template/), [`_deprecated_function`](https://chugunov.pro/api-wordpress/functions/_deprecated_function/), [`get_option`](https://chugunov.pro/api-wordpress/functions/get_option/).

Оригинал в официальной документации: https://developer.wordpress.org/reference/functions/_resolve_home_block_template/
