Learn Plugin Development
200 tutorials and 12 series, ready when you are.
Building a settings import and export feature
A feature you will often see large plugins provide is the ability to import and export their settings, making it much easier to migrate sites or to simply replicate the same setup across multiple sites.
Template File Loaders in Plugins
Template files are very standard for themes and heavily used in child themes. For example, if a user wants to modify the layout of their site pages, they can simply copy page.php from their parent theme to a child theme, modify the HTML structure, and the changes will be reflected on the site. While it’s…
Sometimes direct $wpdb queries are better
WordPress has some really awesome functions and classes for retrieving data from the database: WP_Query, WP_User_Query, get_comments(), get_the_terms(), and many, many more. Most of the time these are the functions and classes you should use when querying data from the database–they have some great benefits, such as caching–but there are times when it is actually…
The dangers of the gettext filter
Get array of all URLs in a string
WordPress 3.7 introduced a new function called wp_extract_urls(). This is a handy function that allows you to extract URLs from text strings. Simply pass the text string to the function and it will return an array of URLs.
User Follow System – Part 7
In this final part of the User Follow System tutorial series, we will create two short codes, one for displaying a follow/unfollow link for a user and one for displaying a list of recent posts from users you (the currently logged-in user) follow. We will wrap up the series by also showing a few areas…
User Follow System – Part 6
In part 5 of this tutorial series we wrote the Javascript that is responsible for firing off the ajax events when a user is followed or unfollowed. Now, in this part, we are going to write the PHP side of the ajax events that takes care of processing the requests and sending a response back…
Restricting Menu Items to Active Members in Restrict Content Pro
If you want to restrict menu items to active subscription holders, or members of specific subscription levels in Restrict Content Pro, the Menu Item Visibility Control will make your job pretty easy and provide complete control.
Building good template files
It is becoming more and more common for plugins to provide template files that can be copied to a theme’s folder and then safely modified. This means that the site owner that is using the plugin can add, remove, and modify the markup of the plugin without hampering the upgrade process when new versions are…