首页 WordPress函数大全 get_post_type()

get_post_type()

2020-05-01 / 4811阅 / 悠然

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

get_post_type( int|WP_Post|null $post = null )

Retrieves the post type of the current post or of a given post.

描述

参数

$post

(int|WP_Post|null)
(Optional)
Post ID or post object. Default is global $post.

Default value: null

返回

(string|false) Post type on success, false on failure.

大家谈论
    我的见解