get_query_var('page') returns empty string
-
OK … This is driving me crazy., I am trying to paginate my results in a custom page template. However, I noticed that get_query_var is always returning an empty string.
If I hit domain.com/custompage/page/2, the following will return “1”:
$paged = (get_query_var(‘page’)) ? get_query_var(‘page’) : 1;If I hit domain.com/custompage/page/2, the following will return and empty string:
$paged = get_query_var(‘page’);I have made sure that I am passing “page” and not “paged” as the parameter. Does anyone see what I am doing wrong?
Thanks
Brian
- The topic ‘get_query_var('page') returns empty string’ is closed to new replies.