single_term_title
Filter HookDescription
Filters the custom taxonomy archive page title.Hook Information
File Location |
wp-includes/general-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1628 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$term_name
|
Term name for archive being displayed. |
Usage Examples
Basic Usage
<?php
// Hook into single_term_title
add_filter('single_term_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:1628
- How this hook is used in WordPress core
<?php
1623 *
1624 * @since 3.1.0
1625 *
1626 * @param string $term_name Term name for archive being displayed.
1627 */
1628 $term_name = apply_filters( 'single_term_title', $term->name );
1629 } else {
1630 return;
1631 }
1632
1633 if ( empty( $term_name ) ) {
PHP Documentation
<?php
/**
* Filters the custom taxonomy archive page title.
*
* @since 3.1.0
*
* @param string $term_name Term 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.