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