Cleaning Up After Your Plugin

In this tutorial we're going to look into how you can clean up after your WordPress plugin when it's deactivated or uninstalled. This is an area of plugin development that is often overlooked or forgo...

How To Use Page Templates In A Plugin

In this tutorial we're going to investigate how you can override a theme template files from your WordPress plugins. For this we're going to be using two filters: theme_page_templates template_inclu...

One Plugin Vs Lots Of Smaller Plugins

Yesterday I asked this question on Twitter and was quite interesting to see the response to the question so I wanted to post it on here and open the discussion up to more people (other than those on T...

Using Composer With WordPress

In this tutorial we're going to investigate using composer as the dependency manager for WordPress. What Is Composer? Composer is a dependency manager for PHP which allows you to easily manage any thi...

Run Code For Multisite On Plugin Activation

When you're developing a new plugin you may need to run some code on the activation of the plugin. For example if your plugin requires a database table to be installed on the site then you need to mak...

How To Create A Custom Geotag Field On Formidable

In this tutorial we're going to use the Formidable plugin and create a new field type that will use HTML5 geolocation to get the current user location, once we get the user location we're going to dis...

Dequeue Styles and Scripts In WordPress

When developing on WordPress one of the first things you need to learn about is how to add Javascript and Stylesheets to your page correctly. If you're new to WordPress you can find out more informati...

Restrict Content Pro Stats WordPress Dashboard Widget

If you use Restrict Content Pro on your WordPress membership site then you most likely find yourself logging in regularly to check the stats on your site. One of the bits of information I want to see...

Back To Top WordPress Plugin

In a previous tutorial I wrote about how you can use jQuery to create a Scroll back to top button. jQuery Back To Top In this tutorial we are going to create a WordPress plugin that adds scroll back t...

Get A WordPress Plugin File Path Or URL

In this code snippet we are going to look into how you get a full path of a plugin file. When you are developing a plugin you can store multiple file types in it such as CSS or JS files where you need...

Using Namespacing And Autoloaders In WordPress Plugins

One thing I have been experimenting with recently is adding namespacing and autoloaders to new WordPress plugins. What Are PHP Namespaces PHP namespaces was introduced in version 5.3. Namespaces is a...

Override Theme Template In Plugin

In this tutorial we are going to look at how you can override a theme template file from within a plugin. When WordPress displays a piece of content it selects the theme template by using a hierarchy...

Using AJAX In WordPress

In the following tutorial we are going to learn how you can use AJAX in WordPress to run your own functions. The way this works in WordPress is by allowing you to attach your own actions that you can...

Get A List Of Registered Actions In WordPress

WordPress actions and filters is an event driven architecture that allow you to run specific code at certain times in your application. To do this WordPress uses two functions the add_action() to add...

Change Language Locale From WordPress Plugin

WordPress has the ability to be fully translated, this can be done in both themes and plugins. Translation Files To get WordPress to translate all of the text it uses the GNU gettext system, which wra...