2017-06-01 48 views

回答

0

我居然找到一个解决办法我自己,因为任何人都需要它:

function getCompletePermalinkWithParams($new_parameters = array()) { 
     $new_query_string = http_build_query(array_merge($_GET,$new_parameters)); 
     $complete_permalink_with_params = get_permalink() .'?'. $new_query_string;   
     return $complete_permalink_with_params; 
    } 

您也可以使用函数参数的新参数添加到现有的。 干杯!

相关问题