# get_the_post_type_description()

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

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

## Сигнатура

```php
get_the_post_type_description(): string
```

## Описание

Получает описание для архива типа записи.

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

`string`

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

Файл: `wp-includes/general-template.php:1870`

```php
function get_the_post_type_description() {
	$post_type = get_query_var( 'post_type' );

	if ( is_array( $post_type ) ) {
		$post_type = reset( $post_type );
	}

	$post_type_obj = get_post_type_object( $post_type );

	// Check if a description is set.
	$description = $post_type_obj->description ?? '';

	/**
	 * Filters the description for a post type archive.
	 *
	 * @since 4.9.0
	 *
	 * @param string       $description   The post type description.
	 * @param WP_Post_Type $post_type_obj The post type object.
	 */
	return apply_filters( 'get_the_post_type_description', $description, $post_type_obj );
}
```

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

- 4.9.0 — Introduced.

## Связанные

Использует: [`get_query_var`](https://chugunov.pro/api-wordpress/functions/get_query_var/), `WP_Query`, [`apply_filters`](https://chugunov.pro/api-wordpress/functions/apply_filters/), [`get_post_type_object`](https://chugunov.pro/api-wordpress/functions/get_post_type_object/).
Используется в: [`get_the_archive_description`](https://chugunov.pro/api-wordpress/functions/get_the_archive_description/).

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