Title: category_list_link_attributes
Published: May 7, 2019
Last modified: August 20, 2026

---

# apply_filters( ‘category_list_link_attributes’, array $atts, WP_Term $category, int $depth, array $args, int $current_object_id )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/category_list_link_attributes/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/category_list_link_attributes/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/category_list_link_attributes/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/category_list_link_attributes/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/category_list_link_attributes/?output_format=md#wp--skip-link--target)

Filters the HTML attributes applied to a category list item’s anchor element.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/category_list_link_attributes/?output_format=md#parameters)󠁿

 `$atts`array

The HTML attributes applied to the list item’s `<a>` element, empty strings are 
ignored.

 * `href` string
 * The href attribute.
 * `title` string
 * The title attribute.

`$category`[WP_Term](https://developer.wordpress.org/reference/classes/wp_term/)

Term data object.

`$depth`int

Depth of category, used for padding.

`$args`array

An array of arguments.

`$current_object_id`int

ID of the current category.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/category_list_link_attributes/?output_format=md#source)󠁿

    ```php
    $atts = apply_filters( 'category_list_link_attributes', $atts, $category, $depth, $args, $current_object_id );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-walker-category.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/class-walker-category.php#L144)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/class-walker-category.php#L144-L144)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/category_list_link_attributes/?output_format=md#related)󠁿

| Used by | Description | 
| [Walker_Category::start_el()](https://developer.wordpress.org/reference/classes/walker_category/start_el/)`wp-includes/class-walker-category.php` |

Starts the element output.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/category_list_link_attributes/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.2.0](https://developer.wordpress.org/reference/since/5.2.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fcategory_list_link_attributes%2F)
before being able to contribute a note or feedback.