I've just launched a site that has a RESOURCES section in it, listing of school, documents etc. now the client asks to add an 'Alphabetical Sorter' that will enable the users to see in each specific category the post/resources according to their first letter.

This wouldn't be to hard (theoretically), the problems are that those are custom-post-types with nested categories and I already manipulate the request (on the request filter) to get what I want and not a 404.

The structure is domain.com/resources/parent-category/child-category/post-name and I'd like to have pretty permalink look so domain.com/resources/parent-category/child-category/A-Z and not using a index=A-Z.

This should also work (show the correct posts in a-z order) when the user deletes part of the url, i.e. domain.com/resources/parent-category/A-Z or domain.com/resources/A-Z.

What would be the best approach for that, considering we can't go back and add 'category per letter', taxonomy, custom field etc.? Is there a way to maybe hook into the raw SQL and edit it like here http://wordpress.org/support/topic/first-letter-posts?


3 Answers 3


My recommendation would be to use query_posts() to modify your query such that orderby=title and order=ASC ... this will return the same results as your first query, but with the posts ordered alphabetically by title.

  • Both are public query vars, the user would only need request them in the query string to the given page.
    – t31os
    Dec 18, 2010 at 19:24
  • @EAMann query_posts()? :)
    – kaiser
    Oct 29, 2012 at 9:05

This plugin might be helpful: http://www.nateomedia.com/wares/downloads/wordpress/wp-snap/

(WP-SNAP stands for: WordPress System for Navigating Alphabetized Posts)


Definitely the Advanced Post Types Order is the best plugin for that purpose, it allow to alphabetize the post for certain categories. Also you can order using a custom field.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.