How To Intercept 404 Errors In WordPress

When you go to a URL in WordPress it first needs to analyse this URL and decide what content it is going to show to the user. WordPress will take the requested URL and search the content for the corre...

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...

No More Comment Spam

Since moving my comments from Disqus back to native WordPress comments I was getting a lot of spam comments a couple every minute. I had the suggested plugins installed like Akismet. Akismet is owned...

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...

Restrict Access To WordPress Login Page

In this tutorial we're going to create a WordPress plugin that can be used to help improve the security of your site by restricting access to the login page by a querystring password override. With th...

Change WordPress Database Prefix

As WordPress is an open source application all the database table names are known to everyone. If someone knows the name of your database table it makes it easier for them to guess a SQL injection scr...

Get WordPress Image ID By URL

In a recent project I needed to automatically assign a image to a post from a URL. This situation happened where I had a library of image URLs which on the publish event of a new WordPress post we nee...

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...

Stop WordPress Automatically Adding br

WordPress uses a function called wpautop to automatically add paragraphs and line breaks to your content from the content editor. This will change double line breaks and convert them into a HTML parag...

WordPress Recent Posts Shortcode

On WordPress.com you automatically get are a large number of shortcodes that you can use on your blog. Here you can view all the default shortcodes on WordPress.com. One of these shortcodes is to disp...