WordPress:Plugins/WordPress Widgets

来自站长百科
Xxf3325讨论 | 贡献2008年9月25日 (四) 09:46的版本 (新页面: ==What is a Widget?== WordPress Widgets are also known as "sidebar accessories" which are WordPress Plugins or add-ons to your WordPress blog sidebar. Developed by [http://www.automattic...)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航、​ 搜索

What is a Widget?

WordPress Widgets are also known as "sidebar accessories" which are WordPress Plugins or add-ons to your WordPress blog sidebar. Developed by Automattic for WordPress and WordPress.com blogs, WordPress Widgets allow the easy addition of design elements, gadgets, content, images, and more to your WordPress sidebar to personalize your blog without knowing HTML, PHP, or any code. Many WordPress Plugins now come with a Widget version to allow easy addition to the sidebar.

right|thumb|WordPress Widgets Available to choose fromSince Version 2.3, Widgets are fully integrated into WordPress. The API has improved to make them easier to use and able to be moved around on your sidebar through the Design panel of your WordPress Theme options.

Using Widgets

right|Available WordPress Widgets on the Design Panel for WidgetsThe Widgets SubPanel provides information on the various WordPress Widgets which come with WordPress and how to use them. Widgetized WordPress Plugins will appear in the Widgets SubPanel when the Plugin is activated.

left|thumb|Select the sidebar in which you want a specific WordPress Widget to appearIn general, add WordPress Widgets from the list of Widget options to the sidebar of your choice, if your WordPress Theme features more than one sidebar. You can move the Widget around on the sidebar, changing the order and placement.

To edit or change the options for a specific Widget, click the icon on the right side of the Widget to access the Widget's Options. When you made the changes and selected the options, click okay or click on the browser away from the option popup.

The content WordPress Widgets provides range from the basic ability to add "static" text, images, and links to your WordPress blog sidebar, to adding automatically generated link lists, images, videos, counters, and much more.

The most recent versions of WordPress come ready to add Widgets, however, WordPress Themes must be made ready to use WordPress Widgets. See Widgetizing Themes for more information.

Using Text Widgets

The built-in Text Widget that comes with the latest versions of WordPress can be used to add new content, links, and images to your WordPress blog sidebar. You can add as many text widgets to your sidebar as you need, and each one can have completely different content.

right|thumb|Add text Widget to sidebarTo add a text Widget to your blog's sidebar, go to Design > Widgets and choose which sidebar you would like the text Widget to appear on. Then chose Add Text from the list of Widgets.

right|thumb|Click Edit to edit the text WidgetClick Edit to enter the widget Options and enter the text in the text Widget.

right|thumb|Adding text to a text WidgetTo add text or code to the text Widget, there are two sections to add content. In the top line, enter a description or title for that particular widget. In the next section of the form, enter the the text or HTML code for the widget.

To change or add the new text to the text Widget on your blog, click Change. To remove the text Widget from your blog's sidebar, click Remove.

Here's a list of content known to work via the WordPress Text Widget. These content providers supplies the necessary code for you to copy and paste into your widget to display their content on your blog. [Subject to Change]

Using RSS Widgets

The built-in RSS Widget can be used to add feeds to your sidebar. As with the text widget, you can have as many RSS widgets as you need.

Click the Edit link on the Widget to open the panel to allow you to add the URL for the feed, a description of the feed, and how many items from the feed you want displayed, and other options.

You can add feeds from various sources, such as del.icio.us, Ebay, Sabifoo instant messaging accounts at AOL Instant Messenger, Jabber, MSN Messenger, Yahoo Messenger, and Google Talk, and RSStalker.com with Amazon products, wishlists, and categories. Or you can add feeds from various blogs you enjoy.

In general, the WordPress RSS/Feed Widget will only import titles. If the visitor hovers their mouse over the title link, the description will include the excerpt or the first few hundred words of the blog post.

Finding WordPress Widgets

The WordPress Plugin Directory includes WordPress Widgets and WordPress Plugins with Widget options. It offers the most extensive listing of WordPress Widgets. Search for Widgets or click on the Widget tag.

Making Themes Widget-ready

In order for WordPress Widgets to work on WordPress Themes, the Theme must be made "Widget-ready." See Widgetizing Themes for detailed instructions to make your theme recognize WordPress Widgets.

Alternatively you can choose a theme that is already widget-aware from the list of WordPress Theme Directory.

Writing Your Own Widgets

WordPress Plugins can be converted to Widgets or take advantage of the Widgets API to add Widget features and options. The developer documentation on writing your own WordPress Widget Plugins, see the Widgets API.

Other Resources on WordPress Widgets

模板:PluginIndex