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

追格官方小助手/ 2022年10月22日/ WordPress/ 浏览 1258

the_permalink为WordPress输出文章固定链接标签函数,用于输出文章的固定链接,即伪静态形式的链接地址。


需要注意的是,需用在The Loop主循环中


the_permalink( $post = 0 )


使用示例


<a href=\"<?php the_permalink(); ?>\"><?php the_title(); ?></a>


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

发表评论

暂无评论,抢个沙发...

客服 工单