get_query_var returning nothing or 0?

3.8k views Asked by At

Im using canvas template for my website, and I have also created my customized search in search.php

The search works fine till I have to paginate the results. When showing the first page, the url: http://myurl.com/search/?location=0&type=0&bedrooms=empty&bathrooms=empty&minprice=empty&maxprice=empty&ref=&submit=Search

works great. Then at the bottom of the page (search.php), I call

woo_pagination();

And it shows me the number of pages and next buttons, so far so good, but when I click on next, the url is: http://myurl.com/search/page/3/?location=0&type=0&bedrooms=empty&bathrooms=empty&minprice=empty&maxprice=empty&ref&submit=Search

And I get exaclty the same results.

Im also displying the value of page and paged and Im always getting the same result:

echo 'Page: '.get_query_var('page');
echo 'Paged: '.get_query_var('paged');

Result:

Page: Paged: 0

This is really weird. Could you help me, please??

Thanks in advance

0

There are 0 answers