首页 WordPress函数大全 get_the_post_thumbnail_url()

get_the_post_thumbnail_url()

2020-05-02 / 2615阅 / 悠然

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

get_the_post_thumbnail_url( int|WP_Post $post = null, string|array $size = 'post-thumbnail' )

Return the post thumbnail URL.

描述

参数

$post

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

Default value: null

$size

(string|array)
(Optional)
Registered image size to retrieve the source for or a flat array of height and width dimensions.

Default value: 'post-thumbnail'

返回

(string|false) Post thumbnail URL or false if no URL is available.

大家谈论
    我的见解