Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
In WordPress: Creating Custom Widgets and Plugins with PHP, Drew Falkman teaches PHP developers how to create custom functionality for WordPress 2.0 through 3.0 using widgets and plugins. This course starts by installing and setting up WordPress 3.0 on both Mac and Windows, then provides an in-depth look at tasks related to these WordPress add-ons: installing and administering, building and customizing, creating editable options and database tables, working with posts and pages, and utilizing jQuery and AJAX. There are also tutorials dedicated to promoting a widget or plugin, adding security, and localizing the interface. Exercise files are included with the course.
Let's go ahead and log in to the WordPress admin console and have a look at how site administrators work with plugins. We'll look at how you can install and remove plugins, we'll look at the upgrading process, what it means to activate and deactivate a plugin, and finally how to delete a plugin that's already been installed. So to log in to the admin console, you go into whatever the URL of your WordPress installation is-- In our case with map, it's localhost:8888 /WordPress/wp-admin will always be your administrative console--and log in with the username and password that you chose during the installation process.
So over here on our left, you can see I have this Plugins section. This is where administrators go to administer all the existing plugins, and you can see it's a list of all the plugins that are currently installed in their WordPress environment. In this case, we have three: the two defaults--one is called Akismet which is a web service that checks comments to determine if they are spam or not, we have Hello Dolly, which is just a simple basic plugin that you can take a look at to see how plugins work--and then I have this Tweet This, which I had added later so that I can use Twitter to tweet certain posts.
Notice for each one, you have a plugin name, you have a description of what the plugin does, you a version number, you have whoever the author was of the plugin and very often a link to their site, and finally a link to the plugin site which would go directly to the site that host the plugin. If I want to add new plugins, I can do those directly from the administrator. I simply click the Add New Link. I can filter by Featured, Popular, Newest, Recently Updated. I can do different tags that they have-- these are the popular tags that have been searched at the WordPress directory-- or I can search directly from here.
So if I were to search for something like 'social networking,' you can see I get a number of widgets. They all have a rating and an explanation of what they all are. This is coming directly from the web site, the WordPress.com Plugin Directory. If I want to install any of these-- say this one, it looks pretty good-- I can click the Install Now button. When I acknowledge it, it will actually download a ZIP file into our WordPress installation and extract it into the Plugin Directory.
So now that it's all been installed, I can go back to my Plugins page, and I can see the Social Links plugin has been added to my WordPress installation. If I ever want any of these plugins to be used, I need to click the Activate button. By default when they're installed, they're not actually going to run. They're just going to put the files onto your WordPress installation. So to make them actually run, you need to activate them. Once they're activated, then they'll work. If you ever want to turn them off, you can go ahead and deactivate them.
Deactivating won't uninstall them. In fact, it'll save any settings or database information, typically, but it essentially turns it off. So if you ever have an issue come up, a conflict with different plugins or something, you can just try to deactivate. In fact, usually if there's an error in your WordPress installation, one of the first things you can do is deactivate your plugins and see where you go. The Bulk Actions menu allows you to do a lot of these functions to multiple plugins at the same time.
So by selecting this top check box will check all of them. You can then activate all, deactivate all, upgrade all, or delete all. If you were to look at a live web site, this is my mmmstuff.com blog where I post some nifty little things that I find on the Internet. As you can see, I haven't updated to WordPress 3.0 yet-- in fact, it's prompting me up here that I should, and I will, but I haven't done it yet. This is WordPress 2.92. You can see here in my Plugins page that I have a number of messages here that tell me there is a new version available.
So anything that's hosted at the WordPress.com Plugin Directory will tell me when there's a new version available inside my administrator, so that I can download directly from there. So, for example, this list category post, if I do want to upgrade it, I click Upgrade Automatically. It will then download all the files, just like it did when I installed the plugin, but it will also reactivate the plugin for me. You can see it reactivated successfully. Now when I go back, I now only have seven upgrades to go.
One of the things that you can see in the differences here is that in the Bulk Actions menu I don't have upgrade available. That was something that was added new to Bulk Update at the same time in WordPress 3.0. So that's the basics of interacting with plugins from the WordPress admin console. From there, WordPress administrators can add new plugins, they can update their existing plugins, they can turn them on and off, and when they're done finally, they can delete them. One more thing I want to show you that will be relevant to plugin development as we go along is this Edit button.
If you click on the Edit button, you can actually see the source file of your plugins. We are not going to get into this yet, but this is what we're going to be writing.
Find answers to the most frequently asked questions about WordPress: Creating Custom Widgets and Plugins with PHP.
Here are the FAQs that matched your search "":
Sorry, there are no matches for your search ""—to search again, type in another word or phrase and click search.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.