WordPress Plugin Development Beginner's Guide
上QQ阅读APP看书,第一时间看更新

Creating a widget

Creating widgets is a simple three step process.

  1. Create a function that will display the widget content.
  2. Register that function as a widget using WordPress API.
  3. Done! To enable the widget you need to activate it now in the administration panel.

Let's start our widget by displaying the 'Hello World!' text in the sidebar.