single_tag_title
Filter HookDescription
Filters the tag archive page title.Hook Information
File Location |
wp-includes/general-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1619 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$term_name
|
Tag name for archive being displayed. |
Usage Examples
Basic Usage
<?php
// Hook into single_tag_title
add_filter('single_tag_title', 'my_custom_filter', 10, 1);
function my_custom_filter($term_name) {
// Your custom filtering logic here
return $term_name;
}
Source Code Context
wp-includes/general-template.php:1619
- How this hook is used in WordPress core
<?php
1614 *
1615 * @since 2.3.0
1616 *
1617 * @param string $term_name Tag name for archive being displayed.
1618 */
1619 $term_name = apply_filters( 'single_tag_title', $term->name );
1620 } elseif ( is_tax() ) {
1621 /**
1622 * Filters the custom taxonomy archive page title.
1623 *
1624 * @since 3.1.0
PHP Documentation
<?php
/**
* Filters the tag archive page title.
*
* @since 2.3.0
*
* @param string $term_name Tag name for archive being displayed.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/general-template.php
Related Hooks
Related hooks will be displayed here in future updates.