WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

Hello I have something like this in the url: http://myblog.com/category/subcategory/postname/?var=true

Using it on functions.php:

function add_query_vars($vars) {
   $vars[] = "var";
   return $vars;
add_filter('query_vars', 'add_query_vars');

But I need it: http://myblog.com/category/subcategory/postname/true

How can get it?

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.