get_the_archive_title
Filter HookDescription
Filters the archive title.Hook Information
File Location |
wp-includes/general-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1803 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$title
|
Archive title to be displayed. |
string
|
$original_title
|
Archive title without prefix. |
string
|
$prefix
|
Archive title prefix. |
Usage Examples
Basic Usage
<?php
// Hook into get_the_archive_title
add_filter('get_the_archive_title', 'my_custom_filter', 10, 3);
function my_custom_filter($title, $original_title, $prefix) {
// Your custom filtering logic here
return $title;
}
Source Code Context
wp-includes/general-template.php:1803
- How this hook is used in WordPress core
<?php
1798 *
1799 * @param string $title Archive title to be displayed.
1800 * @param string $original_title Archive title without prefix.
1801 * @param string $prefix Archive title prefix.
1802 */
1803 return apply_filters( 'get_the_archive_title', $title, $original_title, $prefix );
1804 }
1805
1806 /**
1807 * Displays category, tag, term, or author description.
1808 *
PHP Documentation
<?php
/**
* Filters the archive title.
*
* @since 4.1.0
* @since 5.5.0 Added the `$prefix` and `$original_title` parameters.
*
* @param string $title Archive title to be displayed.
* @param string $original_title Archive title without prefix.
* @param string $prefix Archive title prefix.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/general-template.php
Related Hooks
Related hooks will be displayed here in future updates.