Pagination on custom page templates
-
Hi all,
I’m not using a standard wordpress setup where the blog part is usually on the front page – instead the index template is pretty much just static html for the most part. I do use the blog feature, but instead of putting wordpress in a separate directory I just made a custom page template that acts as if it were the front page on a regular WP blog. (e.g. lists the latest posts)
It works fine except one thing, the pagination doesn’t work. When you click on the older/newer posts link WordPress doesn’t recognize it and returns a 404 error.
This is the site structure:
domain.com
(Main Index Template)
domain.com/blog
(blog listing – a page using a custom page template)
domain.com/blog/page/2
(this *should* return the second page of blog posts, but it doesn’t)So far I’ve gotten the blog page to generate previous posts URL with the correct url like
domain.com/blog/page/2
(by default it would make the linksdomain.com/page/2
). I’ve also gotten pagination to work by using a URL parameter (e.g.domain.com/blog?page=2
), but now I just need it to mapdomain.com/blog/page/*
todomain.com/blog?page=*
Any tips?
- The topic ‘Pagination on custom page templates’ is closed to new replies.