首页 WordPress函数大全 get_the_permalink()

get_the_permalink()

2020-05-02 / 3668阅 / 悠然

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

get_the_permalink( int|WP_Post $post, bool $leavename = false )

Retrieves the full permalink for the current post or post ID.

描述

This function is an alias for get_permalink().

See also See also

  • get_permalink()

Top ↑

参数

$post

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

$leavename

(bool)
(Optional)
Whether to keep post name or page name.

Default value: false

返回

(string|false) The permalink URL or false if post does not exist.

大家谈论
    我的见解