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

Custom Field Widget

描述

The Custom Field Widget displays values of custom field keys, allowing post- and page-specific meta sidebar content with limitless applications.

Custom Field Widget is for WordPress 2.6.x and features:

  • Multiple widget instances possible
  • Widget-specific optional title and text
  • Conditional functionality, i.e., without a matching key, the widget is not displayed
  • Practically unlimited possible uses

Use

If you are unfamiliar with custom fields, you should first read about them on the WordPress Codex.

Custom fields are added to posts and pages from the Write > Page and Write > Post menus, just below the main editor area. You may add as many custom fields to a post/page as you like.

There are two separate fields for each custom field: the key and its value. The Custom Field Widget finds a specified key and then displays its corresponding value in the sidebar. Without a matching key, nothing is displayed.

The Custom Field Widget doesn’t necessarily ‘do’ anything, but it enables an advanced (and often overlooked) feature built-in to WordPress. For example, see 28 Ways to Use WordPress Custom Fields for a small picture of possibilities.

I developed this plugin for my own use. I wanted to display a small table of contents for certain pages (which are without categories) in the sidebar dynamically. Without a widget, I would have to edit the sidebar file(s) for each theme I used.

Because each table of contents (a short ol of items) varied from page to page, it also had to be specific to each page. So I created a custom field key of toc and added the ol of items to its value. Enabling the plugin, I had a table of contents appear in the sidebar for each page with a custom field key of toc.

The uses and applications of WordPress custom fields are infinite. Just search for WordPress custom fields for thousands of results on this subject.

License

Custom Field Widget, a plugin for WordPress, (C) 2008 by Scott Allan Wallick, is licensed under the GNU General Public License.

Custom Field Widget is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Custom Field Widget is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Custom Field Widget. If not, see http://www.gnu.org/licenses/.

螢幕截圖

  • Custom Field Widget is a multiple-instance widget that shows custom field values matching specified keys in your sidebar.

安裝

This plugin is installed just like any other WordPress plugin. More detailed installation instructions are available on the WordPress Codex.

  1. Download Custom Field Widget
  2. Extract the /custom-field-widget/ folder from the archive
  3. Upload this folder to ../wp-contents/plugins/
  4. Activate the plugin in Dashboard > Plugins
  5. Customize from the Design > Widgets menu
  6. Enjoy. And then consider donating

In other words, just upload the /custom-field-widget/ folder and its contents to your plugins folder.

常見問題

What does this plugin do?

Custom Field Widget displays the custom field values of a specified custom field key in your sidebar.

I have no idea what your answer means.

That’s fine. Read the Use section for more information on using custom fields and possible applications of this plugin.

Fine. Can you give me one example of what I could do with this plugin?

You could use it to display a graphic in the sidebar that you set on a per-post and/or per-page basis. Say you want certain posts/pages to include a graphic that aren’t necessarily categorized together. Create a custom field with a common key and this widget will display the corresponding values in the sidebar.

That’s pretty slick. Give me another example.

No. See the Use section and let your imagination run wild.

I’d like to modify this plugin in some way unavailable through the widget options panel. Will you help me?

No. I apologize as I am unable to help with modifications with any of my plugins.

Well, thanks for nothing.

Not even thanks for the plugin?

Sure. Thanks for the plugin.

You’re welcome. Enjoy.

評價

閱讀全部4個評價

貢獻者及開發者

“Custom Field Widget” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 Custom Field Widget 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄