I am trying to put variables into the URL, which I can then use in my Wordpress template. So for example I have created a wordpress template something.php and the page "somepage" with this template. Now in my something.php I am trying to get a variable (for example something.php?variable=whatever) into my script in order to use it there. Im doing this with $_GET["variable"]. Now everything worked fine on the test server. Now I have put it onto the real server (which is actually the same server, just another copy of wordpress) and there it doesnt work. Opening the URL www.example.com/somepage?variable=whatever will directly lead to www.example.com/somepage. So Wordpress is removing every variable in the URL. Another thing that doesnt work and that probably has to do with the same problem is a search, which I created and which has the post type "post", not "get". What do you think could be the problem, since it worked perfectly fine on the same server with another wordpress copy (same version).
Thank you very much for your help! phpheini
variable? I guess in this case beeing specific won't much of a failure.
example.com/index.php?pagename=somepage. So in essence what you end up with is
example.com/index.php?pagename=somepage?var=valwhich gets ignored because the
?is invalid after the first. Golden Apples has you covered in his answer.. ;)