Depending on the complexity of your plugin you may need to make some additions to the WordPress admin area. Learn what the possibilities are for customizing the WordPress admin.
- View Offline
- [Instructor] Depending on the complexity of your plug-in, you may need to make some additions to the WordPress admin area. For instance, let's take a look at Akismet here. When we activate that plug-in, we're shown a link here to the plug-in settings page, and that same link appears here in the Settings menu, and we've even got this big banner letting us that there are some steps to take before using Akismet. In this case, it's registering an account. So, all three of those links lead to the same settings page. I'm going to go ahead and click that here, and we can see that we've got a very basic settings page.
There's really nothing to do here other than activate the Akismet account. Now to see something quite different, let's activate the Easy Digital Downloads plug-in. When I activate that it redirects me to a sort of intro page, and I can also see that it added a top-level menu item called Downloads. If I open that menu, I can see a submenu. So, here we've got Downloads, which is a custom post type, we've got Categories and Tags, which are taxonomies, and variety of other things going on, including a Settings page.
Unlike Akismet, this is a pretty robust admin interface, with lots of options for users. Let's look at one more plug-in, and that's going to be the Hello Dolly plug-in. Now this plug-in is super basic. It does one thing and one thing only, display a lyric from "Hello, Dolly" in the upper right corner of my admin screen. It doesn't add anything to the menu, nor does it have any settings. I wanted to point out three very different plug-ins here in terms of what's happening in the WordPress admin. We've got Hello Dolly, which gives the user no options, Akismet, which gives some options, and Easy Digital Downloads, which gives lots of options.
I wanted to show you this so that you can get an idea of what's possible with plug-ins, and how they behave in the WordPress admin. Let's head over to the plug-in handbook, and we'll tie what we just looked at into some documentation. First, we've got Administration Menus. Just like what we saw with Easy Digital Downloads, you can add both top level and sublevel menu items. We've also got Settings, which is a massive suite of hooks, functions, and more that plug-in developers can use to build admin interfaces.
This is really just the tip of the iceberg. You could really dedicate an entire course to working with the admin interface in WordPress. Now that you have a taste of what's possible, you know where to go to learn more.
Curious what you can do with a plugin? Carrie covers some practical examples, including plugins for additional post types, custom taxonomies, and new admin features or layouts. Plus, get best practices for documenting and securing your plugin, and find out how to make your plugin accessible to others by internationalizing it or sharing it on WordPress.org.
- Setting up a local development environment
- Using plugins vs. themes
- Writing a simple plugin
- Working with the Plugin API
- Creating actions and hooks
- Documenting and securing your plugin
- Internationalizing plugins
- Hosting plugins in the WordPress repository