WordPress Sort Category Posts By Title

May 23rd, 2006

WordPress Open-Source PluginsI have written a plugin for those who have been asking for a quick way to sort posts in category view alphabetically by title, rather than the usual chronological order. This is important if your readers don't care when things were posted. This plugin was designed for WordPress 2.0.2.

Download it here: sort_category_posts_by_title.zip To install, simply extract to /wp-content/themes/plugins and Activate from inside the WordPress Plugins panel. Currently this is designed to only alphabetize posts when viewed by category and will not alphabetize posts on the front page, search results, archives, etc. It manipulates the query_vars->order_by and query_vars->order variables from inside classes.php so that sorting is done by title, in ascending order. But the code is simple enough, if you want to make it do that yourself.

Posted in:

58 Responses to “WordPress Sort Category Posts By Title”

  1. BloggingPro China » Blog Archive » WordPress Plu (not verified) Says:

    [...]   Sort Category Posts By Title,虽然我不知道在每一个分类下安字母顺序排列对于中文Blog有多大意义,不过好奇的可以尝试一下。 category post sort [...]

  2. カテゴリー毎の記事表示をアルファベット順に « :: plasticdreams :: (not verified) Says:

    [...] Sort Category Posts by Title [...]

  3. 今有効化しているプラグインを列挙してみよう « :: plasticdreams :: (not verified) Says:

    [...] Sort Categories by Title…カテゴリーの記事の一覧表示をタイトル順に [...]

  4. Bokinuk (not verified) Says:

    Thks :) Did the trick for me - was using the date to sort ... archaic :(

  5. Wes (not verified) Says:

    Is it possible to modify this to sort by custom field instead of title?

  6. mikesmullin Says:

    Good question. Yes, it is possible. Just change line 15 from 'title' to whatever column you want to sort by.

  7. Wes (not verified) Says:

    Forgive my ignorance... I searched wordpress support but I can't tell... if it's a custom field do I need to just put the "key" name or is there something additional to add?

  8. Philip Gowman (not verified) Says:

    Great idea for a plugin. Of course, a question: How would I set about listing _some_ categories alphabetically (eg book reviews, by author) and other categories (eg event listings and news items) by date? There's always someone, huh?

  9. mikesmullin Says:

    I have had two requests for this added functionality, so I will provide it in a new version coming soon. I'll keep everyone posted as soon as the update is released.

  10. jon (not verified) Says:

    make that a third request! thanks mike

  11. rcsabado (not verified) Says:

    hi, what about listing only the post title on category view. or post with date and a little excerpt? I hope someone can provide this. thanks a lot.

  12. Klaus (not verified) Says:

    Hi, I downloaded and activated your plug-in but I can not find the extra function conerning sort in alphabetic order on my dashboard. rgds Klaus

  13. good » Blog Archive » 测试 (not verified) Says:

    [...] WordPress Sort Category Posts By Title  edit / delete [...]

  14. johnny (not verified) Says:

    Very handy plugin For some reason though for my site once I use your plugin the final item once is shown outside the loop. It's hard to explain this but once a new post is added after the plugin is activated the if this is the final item alphabetically then it is displayed outside my "storycontent" DIV which should surround the entire loop. Any ideas?

  15. La 57ième boule de cristal » Archives du Blog » (not verified) Says:

    [...] Les billets sont maintenat triés par titre dans l’affichage des pages par catégories. (plugin Sort Categories by Title) [...]

  16. » links for 2006-10-14 原始社会好 (not verified) Says:

    [...] WordPress Sort Category Posts By Title Sort Category Posts By Title,虽然我不知道在每一个分类下安字母顺序排列对于中文Blog有多大意义,不过好奇的可以尝试一下。 (tags: wordpress) 归类于: Del.icio.us Tags : No Tags 相关 Tags : No Tags Previous post in Del.icio.us:links for 2006-10-13 Next post in Del.icio.us:links for 2006-10-22 相关文章 [...]

  17. Sue (not verified) Says:

    I find that if one title happens to have a space at the beginning (from copying and pasting a title without noticing) that the whole list does not get sorted out correctly. Is there a way to make it ignore spaces at the beginning of the title? thanks :)

  18. Ye (not verified) Says:

    Hi Mike, will it possible to modify the WP-DB class so that it can actually join another table and sort the posts plus comments all together?

  19. [[C|-|E]] (not verified) Says:

    It works great for me in Mundo-CPC, thank you very much!!! :D (I hope it will run ok under WP 2.1). I´ll try to make a donation ;).

  20. livingston samuel (not verified) Says:

    Thanx for developing and sharing this plugin, this is what I was looking for. :)

  21. Luke (not verified) Says:

    Have been trying to make it use custom field values as sort criteria on WP2.2 by changing the 'title' to 'parag' which is the name of the custom field. Did not work for me :-(

  22. WP - Ba (not verified) Says:

    [...] WordPress Sort Category Posts By Title __________________ RapidShare URL K

  23. WP Plugins DB » Plugin Details » Sort Categories (not verified) Says:

    [...] Visit [...]

  24. Steve (not verified) Says:

    Great pluGin - I am new to wordpress and this was a big help.

  25. Steve (not verified) Says:

    Great plugin!

  26. Garrett Boon (not verified) Says:

    Thanks for making this into a plugin!

  27. banago (not verified) Says:

    Hi! I just installed the plugin and clicked for the results, but it continues to sor my categories by expert. My inex.php code for posts is: Do you think this is the reasin it goes on dispaying the categories in excperts? If not, what can it be? I am using Wordpress ver. 2.2 Thank you!

  28. Yannick Thibodeau (not verified) Says:

    Awesome. Would be nice to have a feature that let the user chose: Sort by: Title | Date | Custom Field... I'm waiting :)

  29. opmMP3 (not verified) Says:

    just what i needed. thanks for this plugin I hope there's an update to sort search results too!

  30. Flick (not verified) Says:

    Is this compatible with WP 2.1 ? :) Thanks!

  31. Post new comment

    Please type the letters you see in the picture below.

    Image CAPTCHA