Writing a widget bears some similarities to writing a plugin, but in some ways it's easier because there is a widget class that you can leverage for some of the functionality.
In this section, we will see how to write a widget that displays recent posts from a particular category in the sidebar. The user will be able to choose how many recent posts to show and whether or not to show an RSS feed link. It will look like the following screenshot:
Let's get started!
Widgets, like plugins, need to have a unique name. Again, I suggest you search the Web for the name you want to use in order to ...