首页 WordPress函数大全 post_class()

post_class()

2020-05-02 / 4157阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

post_class( string|array $class = '', int|WP_Post $post_id = null )

显示帖子容器元素的类。

描述

参数

$class

(string|array)
(Optional)
One or more classes to add to the class list.

Default value: ''

$post_id

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

Default value: null

大家谈论
    我的见解