Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 默认情况下,_permalink()将把您带到哪里_Php_Wordpress - Fatal编程技术网

Php 默认情况下,_permalink()将把您带到哪里

Php 默认情况下,_permalink()将把您带到哪里,php,wordpress,Php,Wordpress,目前我有: <a href="<?php the_permalink();?>">Click here</a> 所以一旦你点击链接。这将带您到: “single-(此处键入帖子)。php页面链接链接()输出当前在循环中查看的帖子的URL。如果要更改链接的目标,请替换 参考文献: @ValentinMercier我显然已经检查过了。你还没有回答我的问题。文档对此非常清楚。如果你想通过ID获取永久链接,请使用get_permalink函

目前我有:

<a href="<?php the_permalink();?>">Click here</a>
所以一旦你点击链接。这将带您到:
“single-(此处键入帖子)。php
页面

链接链接()输出当前在循环中查看的帖子的URL。如果要更改链接的目标,请替换

参考文献:


@ValentinMercier我显然已经检查过了。你还没有回答我的问题。文档对此非常清楚。如果你想通过ID获取永久链接,请使用get_permalink函数:答案:你在WP_Query post_type='(这里的post type)'中输入了什么?你可以创建一个名为“single-(这里的post type)”的页面.php,因此一旦单击链接。这将带您进入“single-(POST TYPE HERE).php页面
"single-(POST TYPE HERE).php