Порядок категорий в WordPress

Только по алфавиту или ID. ID изменить невозможно. Только пляски с бубном.

Можно включать и исключать категории из списка, чего-то там с дизайном играться
содержательная статься, но не решает проблемы.

Свежий топик, ответа нет…

плагин. Судя по обилию комментариев, не всё просто.
Мораль: лучше сделать свою статическую страницу с категориями (тем паче у меня много черновых и разномастых).


Reorder WordPress Link Categories
Update 1/30/06: a plug-in now exists to handle this.

WordPress lacks the ability to specify the exact order that link categories appear in the sidebar. The get_links_list() function can only order categories by name or id, and this limitation becomes annoying when you create your categories out of order (you can no longer order by id) or want to rename your categories (”Junk” has to appear before “My Favorite Links”).

Here’s how to completely customize the order of your link categories:

Open up your WP database with a database admin tool (eg. MySQL Query Browser or phpMyAdmin).
Find the wp_linkcategories table and the row of the category you’d like to appear first.
Update the cat_name field of that row, prefixing the existing name with the HTML comment: <!–01–> (eg. My Stuff becomes: <!–01–>My Stuff)
Update the rest of the rows in the order you want those categories to appear, prefixing each name with <!–02–>, <!–03–>, et.al.
Now when get_links_list() orders categories by name, they’ll be in order by the numbers in the comments, which will be hidden by the browser.

Note that you can’t simply enter the comment within WP because it will escape the greater/less than characters, breaking the format of the comment. For the same reason you won’t be able to change the edited category names within WP without breaking the comments, though you can remove the comments and go back to ordering by name or id.

Maybe someone will make a plug-in to do this from within the WP interface.



WordPress Plugins

Category Levels 0.3.2 Protects posts and categories according to individual user level. For WordPress versions prior to 2.0.

Category Access 0.8.0 Protects posts and categories according to individual user permissions. For WordPress 2.0, but may work with earlier versions.

Category Order 2.0.0 Allows the blog administrator to set an explicit ordering, spacing, and indentation of categories in the category list that appears in the sidebar. The administrator specifies the ordering in the new “Category Order” management page. There is also an option for placing the category post count inside the link.

Оставьте свой отзыв!

Вам нужно войти, чтобы оставить комментарий.