Has anyone seen any plugin for wordpress that provided an alphabetical index of categories that would take you to a page of categories belonging to a particular letter. Basically, there is a list: A B C D … X Y Z that you can click on, and when you click on A, you go to a page where you see all the categories that start with letter A?
I have searched for over an hour and cannot find this… I started messing around with the MySQL doing this SELECT term_id as id, name as post_title FROM wp_terms ORDER BY name
but this is also including tags within categories, and I just want to grab the categories.
Update:
Ok, so it looks like I can grab just the categories from wp_term_taxonomy via something like this:
SELECT term_taxonomy_id FROM wp_term_taxonomy WHERE taxonomy = 'category'
Then, I can take that array and run it here:
SELECT term_id, name FROM wp_terms WHERE term_id IN (that-array) ORDER BY name
How is that? How to create a new table using what I have above?
You can use this function and pass a letter as a parameter
Example usage
you can use transient api for caching your sql query.