the_category_list WordPress Filter Hook

The the_category_list Wordpress hook allows you to display a list of categories for a post. This can be useful for organizing your content and making it easy for readers to find related posts.

apply_filters( 'the_category_list', WP_Term[] $categories, int|bool $post_id ) #

Filters the categories before building the category list.


Parameters

$categories

(WP_Term[])An array of the post's categories.

$post_id

(int|bool)ID of the post we're retrieving categories for. When false, we assume the current post in the loop.


Top ↑

Source

File: wp-includes/category-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.