single_cat_title
Filter HookDescription
Filters the category archive page title.Hook Information
File Location |
wp-includes/general-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1610 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$term_name
|
Category name for archive being displayed. |
Usage Examples
Basic Usage
<?php
// Hook into single_cat_title
add_filter('single_cat_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:1610
- How this hook is used in WordPress core
<?php
1605 *
1606 * @since 2.0.10
1607 *
1608 * @param string $term_name Category name for archive being displayed.
1609 */
1610 $term_name = apply_filters( 'single_cat_title', $term->name );
1611 } elseif ( is_tag() ) {
1612 /**
1613 * Filters the tag archive page title.
1614 *
1615 * @since 2.3.0
PHP Documentation
<?php
/**
* Filters the category archive page title.
*
* @since 2.0.10
*
* @param string $term_name Category 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.