Title: Author Categories
Author: Makis
Published: <strong>2009 年 4 月 11 日</strong>
Last modified: 2009 年 4 月 11 日

---

搜尋外掛

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://s.w.org/plugins/geopattern-icon/author-categories.svg)

# Author Categories

 由 [Makis](https://profiles.wordpress.org/makesites/) 開發

[下載](https://downloads.wordpress.org/plugin/author-categories.1.0.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/author-categories/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/author-categories/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/author-categories/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/author-categories/#developers)

 [技術支援](https://wordpress.org/support/plugin/author-categories/)

## 外掛說明

Numerous people are using WordPress for blogging and in many cases there are more
than one authors on a website. It’s uncomfortably surprising that WordPress doesn’t
support out of the box a category menu for each author separately.

I was looking for this feature online for my personal need but couldn’t find it 
on any plugin. To be exact I was using a modified version of [another similar plugin](http://www.makesites.cc/programming/by-makis/level10-blog-matrix-plugin-for-wordpress-2x/)
but that was until version 2.3 where the database structure changed for WordPress
and it simply stopped working.

As I saw it, it wasn’t worth fixing old, deprecated (and highly cluttered) code,
and there weren’t any other solutions out there, so I decided to create a new plugin.
Thankfully the new database and API made it as easy as I had hoped for.

I ended up with this plugin, that was created as a wrapper of the default category
menu.

It is lightweight and can easily plug-in, plug-out. Furthermore, being an extension
of the default category menu, means that none of the functionality (sorting, post
count etc.) is lost. In fact it can be easily extended and could support future 
versions of the blogging platform for years to come.

### Usage

After you upload an activate the plugin through your admin panel, all you need to
do is call the custom function wp_author_categories() that will create an author’s
menu for you. Notice that this only works in author pages and will revert to the
default category menu in any other case.

If you are using the default template, you can easily find this line in “sidebar.
php” (that displays the category menu):
 < ?php wp_list_categories('show_count=1&
title_li=Categories’); ?>

You can replace it with this condition that will use the wp_author_categories() 
function instead, when you are visiting the author pages

    ```
            <?php 
            /*
            * First write down the arguments you want to use for you menu and store them in a variable. 
            * These are the same for the default menu ("wp_list_categories") and the author menu ("wp_author_categories")
            * you can find more information on the options you can use here: https://codex.wordpress.org/Template_Tags/wp_list_categories
            */
            $args = 'show_count=1&title_li=<h2>Categories</h2>';
            if($author){
                wp_author_categories($args); 
            } else{
                wp_list_categories($args); 
            }
            ?>
    ```

Alternatively, and if you already have an “author.php” file in your template folder,
you can simply rename “wp_list_categories()” to “wp_author_categories()”, passing
the same arguments.

To uninstall, it’s as easy as doing the reverse actions. Delete all references of
the wp_author_categories() function from your template files and uninstall the plugin
through that WordPress’s admin panel.

### License

This work is released under the terms of the GNU General Public License:
 http://
www.gnu.org/licenses/gpl-2.0.txt

## 安裝方式

 1. Upload the file “wp_author_categories.php” in your “wp-content/plugins” directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Inlude the function “wp_author_categories()” in your template files

More detailed information is provided in the “Usage” section of this document.

## 常見問題集

  Known limitations?

To mention some of the things this plugin (in it’s current version) won’t do for
you:
 * It only works with posts (not pages) * The markup created is directed for
the list-type menu (not the drop down version) with simply parenthesis around the
post count. * The author is added as a standard GET variable and does not support
the SE friendly URLs (although it still works)

  Wishlist?

This is naturally an extension of the current limitations…
 * Add some sort of caching
mechanism so all the post count calculations are not done on every page re-load *
Externalise the menu structure to a template file * Support other versions of the
category menu (dropdown, tag cloud…) * Ability to work with any sort of customized
URLs

  Need more help? Found a bug? Have an idea?

Thank you for using this piece of software. Don’t hesitate to respond with any comments
or suggestions.

Contact me at [Make Sites](http://www.makesites.cc/contact/)

You can always find the latest version of this plugin here:
 http://www.makesites.
cc/projects/wp_author_categories

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈Author Categories〉的開發相關工作。

參與者

 *   [ Makis ](https://profiles.wordpress.org/makesites/)
 *   [ kdiweb ](https://profiles.wordpress.org/kdiweb/)

[將〈Author Categories〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/author-categories)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/author-categories/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/author-categories/)，或透過 
[RSS](https://plugins.trac.wordpress.org/log/author-categories/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/author-categories/)。

## 中繼資料

 *  版本 **1.0**
 *  最後更新 **17 年前**
 *  啟用安裝數 **10+**
 *  WordPress 版本需求 ** 2.5 或更新版本 **
 *  已測試相容的 WordPress 版本 **2.7.1**
 *  語言
 * [English (US)](https://wordpress.org/plugins/author-categories/)
 * 標籤:
 * [author](https://tw.wordpress.org/plugins/tags/author/)[categories](https://tw.wordpress.org/plugins/tags/categories/)
   [menu](https://tw.wordpress.org/plugins/tags/menu/)[post count](https://tw.wordpress.org/plugins/tags/post-count/)
 *  [進階檢視](https://tw.wordpress.org/plugins/author-categories/advanced/)

## 評分

這個項目尚無任何評論記錄。

[撰寫評分](https://wordpress.org/support/plugin/author-categories/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/author-categories/reviews/)

## 參與者

 *   [ Makis ](https://profiles.wordpress.org/makesites/)
 *   [ kdiweb ](https://profiles.wordpress.org/kdiweb/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/author-categories/)

## 贊助

想要支援這個外掛的發展嗎？

 [ 贊助這個外掛 ](http://www.makesites.cc/donate.php)