admin管理员组文章数量:1391929
I use an API to get a list of jobs. I have created 3 templates. The 1st shows the list of jobs, the 2nd the details of the job selected and the 3rd a form. To create the URL for the form I must use a variable $reference which equals to "ref/ClientName".
But when I click on the button that redirect to the form template, the URL is changed. The "/" in the variable $reference is removed so it becomes "refClientName" instead of "ref/ClientName".
How can I make WordPress to keep my variable with the "/"? Thanks
This what I've tried
//$ref = $_GET['ref'];
global $wp_query;
$ref = $wp_query->query_vars['ref'];
$json=file_get_contents(".json?headers=false&validators=true&ref=$ref&lang=fr");
The ref=$ref stores the variable
本文标签: wp queryHow to allow a variable with quotquot in wordpress url
版权声明:本文标题:wp query - How to allow a variable with "" in wordpress url 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744684350a2619607.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论