Question

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?

Thanks!

Was it helpful?

Solution

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.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top