Title: get_query_var(&#039;page&#039;) returns empty string
Last modified: August 20, 2016

---

# get_query_var('page') returns empty string

 *  [briancostea](https://wordpress.org/support/users/briancostea/)
 * (@briancostea)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/get_query_varpage-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.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [briancostea](https://wordpress.org/support/users/briancostea/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/get_query_varpage-returns-empty-string/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
