wp_list_categories
Filter HookDescription
Filters the HTML output of a taxonomy list.Hook Information
File Location |
wp-includes/category-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 681 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$output
|
HTML output. |
array|string
|
$args
|
An array or query string of taxonomy-listing arguments. See wp_list_categories() for information on accepted arguments. |
Usage Examples
Basic Usage
<?php
// Hook into wp_list_categories
add_filter('wp_list_categories', 'my_custom_filter', 10, 2);
function my_custom_filter($output, $args) {
// Your custom filtering logic here
return $output;
}
Source Code Context
wp-includes/category-template.php:681
- How this hook is used in WordPress core
<?php
676 *
677 * @param string $output HTML output.
678 * @param array|string $args An array or query string of taxonomy-listing arguments. See
679 * wp_list_categories() for information on accepted arguments.
680 */
681 $html = apply_filters( 'wp_list_categories', $output, $args );
682
683 if ( $parsed_args['echo'] ) {
684 echo $html;
685 } else {
686 return $html;
PHP Documentation
<?php
/**
* Filters the HTML output of a taxonomy list.
*
* @since 2.1.0
*
* @param string $output HTML output.
* @param array|string $args An array or query string of taxonomy-listing arguments. See
* wp_list_categories() for information on accepted arguments.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/category-template.php
Related Hooks
Related hooks will be displayed here in future updates.