WordPress Sort Category Posts By Title


I 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.

转自: http://www.mikesmullin.com/2006/05/23/wordpress-plugin-sort-category-posts-by-title/


邮箱地址不会被公开。 必填项已用*标注