A Better WordPress Excerpt by ID Function

One of the things I’d always disliked about the core get_the_excerpt() function in WordPress is that it does not allow you to retrieve an excerpt based on a post ID or object. This limitation means that this function is essentially useless in custom WordPress loops that do not have the global $post object set up.…

Retrieve Users Based on Meta Value

Just like the post meta system, WordPress has a powerful user meta system that allows developers to store additional “meta” information about the registered users in the database. This meta information can be just about anything you want it to be, and can serve a variety of purposes. At the time of writing this tutorial,…

Filter Posts by Custom Taxonomy in Admin

If you have lots of posts in your WordPress site, you have probably used the Category and/or Tag filters at the top of the post list page. These filters are great because they very quickly allow you to limit the kind of posts that are displayed, and let you find the one(s) you are looking…

Writing Your First WordPress Plugin Part 6

In part 6 of Writing Your First WordPress Plugin, I’m going to continue where we left off in part 5 and demonstrate how to create your plugin settings form. We will create a complete settings page that allows you to save your plugin options to the database easily from the Settings page that we added…

Add Contextual Help Screens to the WordPress 3.3 Help Tab

WordPress 3.3 has a really nice new Help menu that can be used by plugin and theme developers to show a lot of helpful information to the users. It’s very similar to the Contextual Help Tab, but allows much more information to displayed in a more organized fashion. Instead of all content being displayed in…

Add User ID Column to the WordPress Users Table

Being able to quickly find the unique ID number of any user in your WordPress database can be very useful, especially if you run a website with lots of users. One of the ways that we can easily find a user’s ID is by customizing the table displayed on the wp-admin/users.php page. We can add…

Display Messages in the Dashboard with Admin Notices

Ever noticed the messages WordPress displays when you activate a plugin, or save settings? Or the messages that some plugins show in the dashboard, perhaps notifying you of a missing requirement? These are called Admin Notices and I’m going to show you how to add your own in your plugin or theme. They’re really quite…

Localizing and Translating WordPress Plugins

In order to be kind to our friends that do not speak the language we have written our plugin in, it is always a good idea to fully localize your WordPress plugin. This means make it “ready for translation”. If you are one of those that is blessed with the fluency of more than one…

Write an Advanced Maintenance Mode Plugin

This tutorial explains the process behind writing a Maintenance Mode plugin for WordPress such as the one I released a few days ago: CGC Maintenance Mode. The final result of this tutorial will give you an advanced plugin capable of putting your site into maintenance mode, while allowing authorized users to view the site normally,…