Widgets are a powerful part of WordPress, and they’re a great way to enhance your site’s sidebar. Or your footer. Or your homepage. Or another part of your site that your theme maker thinks would look really good with some widgets.
For the uninitiated, a “widget” is just a WordPress word for a certain type of drag-and-drop build-block area of your site that is made available by a theme. There are tons of different possible widgets, and many built into WordPress. Traditionally, they exist to allow non-developers to easily customize their WordPress site’s sidebar. But at various times, and in various themes, widgets extend far beyond that. Some themes are widget-areas as far as the eye can see, some use widgets in a number of selected and flexible areas, and there are still some old themes you may come across that make no allowances for widgets at all.
A “widget” is just a WordPress word for a certain type of drag-and-drop build-block area of your site that is made available by a theme
We’ll skip the basic tutorial about how you use widgets, because I want to get to the heart of how you make your own. If you’re not familiar though, I’d recommend reading through this page from the WordPress Codex about the basics of the interaction pattern you use with widgets.
Where? Put The Widget In Your Theme? Or a Plugin?
To make your own widget, you’re going to want to use either your theme’s functions.php
file, or your own plugin. I’m a big opponent of “theme creep”, but I actually think that widgets straddle that hard-to-call borderland between a presentational-only element that’s fine in a theme, and a bit of completely independent functionality that clearly should be in a plugin.
[…] wpshout.com A Complete Guide to Making Your First WordPress Widget […]
[…] user can fiddle with widgets, nor how to make them for yourself (we did cover that one before, with the basics and a guide to user-editable ones). Nope, here we’ll explain how you make areas appear in […]
[…] we’re continuing David’s discussion of widgets from a few weeks ago. In his post, David covered how to make a static widget: one that displays, say, a predefined block of images and text, or […]
Thanks David, great write up. Will you be publishing any info on further using the form and update methods?