Php 如何在get_permalinks函数中添加多个参数

Php 如何在get_permalinks函数中添加多个参数,php,wordpress,Php,Wordpress,我想为特定链接提供永久链接url 我正在为永久链接使用以下代码 但这对我不起作用,有人能告诉我如何在get permalink函数中传递多个参数吗?这似乎是唯一被接受的参数 试用 你可以这样做: <?php // This would output 'http://blog.example.com/2009/04/16/?id=dealIdValue' echo esc_url( add_query_arg( 'id', $dealId, get_permalink(280) ) );

我想为特定链接提供永久链接url
我正在为永久链接使用以下代码


但这对我不起作用,有人能告诉我如何在get permalink函数中传递多个参数吗?

这似乎是唯一被接受的参数

试用 你可以这样做:

<?php
// This would output 'http://blog.example.com/2009/04/16/?id=dealIdValue'
echo esc_url( add_query_arg( 'id', $dealId, get_permalink(280) ) );

如果我像
那样使用它,则页面显示为空白数据,但是如果我像
那样使用它,则页面显示为未找到,这是因为url在查询字符串之前以/结尾吗?