WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've a problem. I've tried a lot of things but I could not find a solution. I use query_vars parameters in this page and there isn't any problem. But i don't use different parameters or the same parameters in different custom page (../videolar). Parameter value is always empty. Parameters used once ? Function.php :

function parameter($qvars){ 
     $qvars[] = 'kategori';
     $qvars[] = 'ara';
     $qvars[] = 'numara';
     $qvars[] = 'tur';
     return $qvars;
add_filter('query_vars', 'parameter');

videolar.php (../videolar?tur=test) :

global $wp_query;
echo $wp_query->query_vars['tur'] // empty
share|improve this question
Could you rephrase: "But i don't use different parameters or the same parameters in different custom page (../videolar)." I don't understand what you mean. – helgatheviking Feb 27 '13 at 17:51

As best as I can understand, you are looking to echo out the value of a query variable. The WordPress function for getting a query variable is get_query_var().

So in your videolar.php template you would add:

echo get_query_var('tur');
share|improve this answer
i've tried this, value is still empty. – etg Feb 28 '13 at 8:27
Hmm.... well then I would disable all your plugins and maybe switch to the default theme to try to isolate the problem. What you are doing looks right to me. Sorry I can't be more helpful! – helgatheviking Feb 28 '13 at 13:21
up vote 0 down vote accepted

The problem is solved.

Re-save your permalink settings after you add the parameter. Or change the file permissions of .htaccess to 777.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.