WPDev.one
Core Function
View Source on Trac ↗

post_class()

post_class( mixed $css_class = '', mixed $post = null )

Displays the classes for the post container element.

Parameters 2 required

Name / Type Description
mixed

(string | string[]) $css_class Optional. One or more classes to add to the class list. Default empty.

Required
(int

| WP_Post) $post Optional. Post ID or post object. Defaults to the global `$post`.

Required

Return Value

(void)
No return value description available.

Function Information

Since Version
2.7.0
Source File
wp-includes/post-template.php
Advertisement