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

I have a page called my-todo-list and is using a custom page template.

The page is accessible via this type of URL : http://domain.com/my-todo-list/

Now I need to paginate it, and I want to look like this: http://domain.com/my-todo-list/page/1

I've read a lot of questions here, but nothing clear.

Any Ideas to make it possible? my template needs something like$page= $_GET['page'] ?

share|improve this question
You'll actually want to use get_query_var( 'paged' ), not $_GET[], as there are no parameters in the URL, since it has been rewritten. – mor7ifer Mar 11 '12 at 20:29
yep, it works! thank you :) – greenbandit Mar 11 '12 at 23:01
Outstanding, I submitted it as an answer so you can mark it as the solution. – mor7ifer Mar 11 '12 at 23:06
up vote 2 down vote accepted

What you will want to use is get_query_var( 'paged' ). This will get the default pagination value, this should be set by default, so you should just be able to plug and play. Because there are no URL parameters due to rewriting, $_GET[] will be completely empty (at least on the example URLs).

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.