Codex

Function Reference/wp get post categories

Contents

Description

Retrieve the list of categories for a post.

Compatibility layer for themes and plugins. Also an easy layer of abstraction away from the complexity of the taxonomy layer.

Usage

<?php wp_get_post_categories$post_id$args ?>

Parameters

$post_id
(integer) (optional) The Post ID.
Default: 0
$args
(array) (optional) Overwrite the defaults.
Default: array

Return Values

(array) 

Examples

Notes

Change Log

Since: 2.1.0

Source File

wp_get_post_categories() is located in wp-includes/post.php.

Related