treehouse : what would you like to learn today?
Web Design Web Development iOS Development

wordpress posts per page

  • Is there a way to let a user choose the number of posts per page? I found a plugin that does it 'DB Posts per page' but it changes the backend as well. I've exhausted google with no luck.

  • Perhaps using a filtering mechanism? For example for a site we gave users a few options to sort the posts on the page (by recent posts, oldest, alphabetical, etc).

    So here is an example of how I did it for sorting a resource library:

    Put the code on pastebin since I couldn't get the markdown to work for coding:

    Two examples: http://pastebin.com/chQS43zk

    I hope that makes sense, and can help you. :)

    -Lindsey