Learn how to create widgets with plugins using the Widgets API. Using the API makes the process pain-free and keeps everything safe and consistent for users.
- [Instructor] In this video we look at how to create…our own custom widgets.…In WordPress, widgets enable users to add content…and display information on the front end of the site.…Here is the WordPress widget screen,…where you can find a variety of default widgets.…These widgets cover a lot of bases, and can be very useful,…but you may want to add your own custom widgets…to go with your plugin.…For example, if you are building a contact form plugin,…you may want to make the contact form…available as a widget,…so users can add it easily to their side bar.…
Fortunately, WordPress provides a widgets API…that provides everything we need to create our own widgets.…Here in the documentation, you will find all of the…functions and steps required to build your own…amazing widgets.…Here is the basic logic that's required…for any WordPress widget.…As you can see, adding a new widget happens…by extending the core widget class.…Then within the new class, we must include four functions.…The first function sets up the widget…
- WordPress APIs
- Action and filter hooks
- Activating and deactivating plugins
- Plugin security
- Creating the directory and files
- Adding menus and the settings page
- Inserting custom functionality
- Testing and debugging WordPress plugins
- Creating widgets
- Managing users and roles
- Adding custom post types and taxonomies
- Working with custom fields and database queries
- Using APIs: Transients, HTTP, and REST
Skill Level Intermediate
WordPress: Developing Secure Siteswith Jeff Starr2h 34m Intermediate
1. First Steps
2. Plugin Basics
3. Building a WordPress Plugin
4. Essential Plugin Techniques
5. Extending Plugin Functionality
6. Advanced Plugin Techniques
Next steps1m 16s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.