1. 首页
  2. WordPress 函数手册

get_the_guid()

get_the_guid( int|WP_Post $post )

检索Post全局唯一标识符(guid)。
Retrieve the Post Global Unique Identifier (guid).

目录锚点:#说明#参数#返回#源码


说明(Description)

guid将显示为链接,但不应用作指向帖子的链接。不应将其用作链接的原因是,将博客跨域移动。


参数(Parameters)

参数 类型 必填 说明
$post (int | WP_Post) 可选 Post ID或Post对象。默认值为全局$post。

返回(Return)

(string)


源码(Source)


更新版本 源码位置 使用 被使用
1.5.0 wp-includes/post-template.php:218 4 3

get_the_guid() 为WP2原创文章,链接:https://www.wp2.cn/functions/get_the_guid/