Tuesday, June 15, 2010

Wordpress: show paginated list of posts at URLs other than site root

I FINALLY fixed the problem on Pugix's blog where the "more recent posts" wasn't paginating properly to older posts. Sadly, my question was ignored on the WordPress forum.

I found the answer in this WordPress documentation codex page, Making Your Blog Appear in a Non-Root Folder.

I *did* have to create a new template. The key was this: the posts.php template isn't a display template, it just generates the query, then loads the display template, index.php. So happy!

1 comment:

  1. Well, that stopped working when I updated from WordPress 2.9.2 to 3.0.

    The not-so-elegant solution was in

    Settings > Reading > front page displays > Posts page

    Unfortunately that didn't use index.php template as it was supposed to, but instead used the static homepage template. So I had to insert conditionals in the homepage (which always makes things harder to read and maintain) to display different templates depending on is_front_page() == true.