Title: Random Blogroll Category
Author: KJ Coop
Published: <strong>2009 年 11 月 19 日</strong>
Last modified: 2010 年 6 月 28 日

---

搜尋外掛

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

![](https://s.w.org/plugins/geopattern-icon/random-blogroll-category.svg)

# Random Blogroll Category

 由 [KJ Coop](https://profiles.wordpress.org/kjcoop/) 開發

[下載](https://downloads.wordpress.org/plugin/random-blogroll-category.zip)

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

 [技術支援](https://wordpress.org/support/plugin/random-blogroll-category/)

## 外掛說明

This plugin will display a given number of random blogroll categories to show.
 
It will show all the links in those categories.

### Usage

Unless you’ve changed some defaults, your blogroll is most likely displayed by
 
the following line of code in wp-content/themes/[your theme]/sidebar.php:

The simplest way to display a random category is just by replacing that line
 with
a call to blogroll_random_category:

If you want to include a link to the whole blogroll, you can create a page in
 wordpress
using the links template. Note the permalink. If you’ve already got a list of your
pages in the sidebar, you’re in business. Otherwise you can add one with the following
line of code: [See complete blogroll](https://tw.wordpress.org/plugins/random-blogroll-category/[your permalink]?output_format=md)

If your blogroll is not set to be categorized, or if there is only one category,

it will return the whole thing untouched.

### Advanced

### Showing multiple categories

If you want multiple categories returned, you can send the function that number.

For example:

will return 5 randomized categories. If you only have 4 categories, it will
 return
all of them in a random order.

### Retaining arguments sent to wp_list_bookmarks

If you’re sending arguments to wp_list_bookmarks, you can send those to
 blogroll_random_category
and it will pass them along to wp_list bookmarks. In this example, we’re showing
all categories except #23:

The change below will show five random categories, none of which will be #23. If

you only have four categories, this will return the three that are not #23:

### To show one category all the time and the rest randomize the rest

In the sidebar you can explicitly call that category. When only one category is

selected, this plugin knows to return it as it is. Any subsequent calls to blogroll_random_category
ought to be instructed to exclude it in order to avoid the possibility that it happens
to be randomly selected:

    ```
    <?php wp_list_bookmarks('category=23'); ?>
    <?php blogroll_random_category(5, 'exclude_category=23'); ?><h3>1.0</h3>* The first version.<h3>1.5</h3>* Whereas this plugin previously altered the behavior of wp_list_bookmarks in a
    ```

way that made it impossible to see the whole blogroll. Now it uses a separate
 function
call so that in some instances you can see random categories, but in others you 
can see the whole blogroll. * Now possible to return multiple random categories 
without separate function calls, thus eliminiating the possibility that two of the
random categories will be the same.

### 1.5.1

 * The leading closing li tag was not actually getting trimmed off due to
    bad copying
   and pasting. That has been resolved.

### A personal request

If you use/enjoy this plugin, I’d love to hear from you. You’re under no
 obligation,
but I’d enjoy knowing that somebody out there is enjoying my work. Promptly returning
e-mail is not my strong suit, so you may never get the courtesy of a reply, but 
you can rest assured that I appreciated your effort.

I can be reached at kj@kjcoop.com.

## 安裝方式

 1. Upload ‘random-blogroll-category.php’ to the ‘/wp-content/plugins/’ directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress

## 常見問題集

None yet.

## 使用者評論

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

## 參與者及開發者

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

參與者

 *   [ KJ Coop ](https://profiles.wordpress.org/kjcoop/)

[將〈Random Blogroll Category〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/random-blogroll-category)

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

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

## 中繼資料

 *  版本 **1.5**
 *  最後更新 **16 年前**
 *  啟用安裝數 **少於 10 次**
 *  WordPress 版本需求 ** 2.5 或更新版本 **
 *  已測試相容的 WordPress 版本 **2.8.5**
 *  語言
 * [English (US)](https://wordpress.org/plugins/random-blogroll-category/)
 * 標籤:
 * [blogroll](https://tw.wordpress.org/plugins/tags/blogroll/)[category](https://tw.wordpress.org/plugins/tags/category/)
   [random](https://tw.wordpress.org/plugins/tags/random/)
 *  [進階檢視](https://tw.wordpress.org/plugins/random-blogroll-category/advanced/)

## 評分

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

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

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

## 參與者

 *   [ KJ Coop ](https://profiles.wordpress.org/kjcoop/)

## 技術支援

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

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

## 贊助

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

 [ 贊助這個外掛 ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9832383)