WordPress Sort Category Posts By Title

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.

42 thoughts on “WordPress Sort Category Posts By Title

  1. Wes Post author

    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?

  2. Philip Gowman Post author

    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?

  3. Mike Smullin Post author

    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.

  4. rcsabado Post author

    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.

  5. » links for 2006-10-14 原始社会好 Post author

    [...] 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 相关文章 [...]

  6. Sue Post author

    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 :)

  7. kavelin.net | Сортировка записей в wordpress в алфавитном по Post author

    [...] Пришла в голову идея выводить в определенной рубрике записи в алфавитном порядке. Поначалу хотел исхитриться и реализовать это встроенными средствами wordpress, но не вышло. Можно конечно в sidebar в ручную прописать ссылки на категории с определенными параметрами и выводить записи хоть задом наперед, но для меня это не вариант. Сайдбар выводится через виджет и пока меня это устраивает, а лезть в дебри знания не позволяют. Пришлось отыскать плагин, зовется он Sort Categories By Title. [...]

  8. carpet Post author

    […] Пришла в голову идея выводить в определенной рубрике записи в алфавитном порядке. Поначалу хотел исхитриться и реализовать это встроенными средствами wordpress, но не вышло. Можно конечно в sidebar в ручную прописать ссылки на категории с определенными параметрами и выводить записи хоть задом наперед, но для меня это не вариант. Сайдбар выводится через виджет и пока меня это устраивает, а лезть в дебри знания не позволяют. Пришлось отыскать плагин, зовется он Sort Categories By Title. […]

  9. Internet Income News Post author

    [...] Sort Categories by Title (free): WordPress normally sorts things in categories by Date, this allows you to sort everything alphabetically which works much better for a shop type layout. [...]

  10. Sagem Phones Post author

    Just a note, if you want to change post titles from Ascending to Descending – example from 1, 2, 3 to 3, 2, 1 just change:
    ‘ASC’ to ‘DES’

  11. David Post author

    Plugin still works in WordPress 3.0.4, and thank goodness because I really needed it for my site.

  12. peter Post author

    Thank you. It works in 3.0.5 without problem. Does anyone know what the syntax is to sort on custom field?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>