WordPress输出文章固定链接标签:the_permalink

WordPress模板标签the_permalink用于输出文章的固定链接,即伪静态形式的链接地址,需要用在The Loop主循环中。

the_permalink( $post = 0 )

该函数没有参数,事实上the_permalink()函数相当于调用了get_permalink( $post ),将当前文章对象传递给了get_permalink()函数并输出返回的结果。

函数使用示例

<a href="">

扩展阅读

the_permalink()函数位于:wp-includes/link-template.php

相关函数:

原创文章,作者:,如若转载,请注明出处:https://ce.771633.xyz/1628.html

Like (0)
Previous 2025年3月8日
Next 2025年3月8日

相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注