I originally wrote this post in August 2015 and published it on Red Dragon Creative’s site. Subsequently, Riaan and I have made the decision to close Red Dragon Creative and for me to focus on WordPress development under my own name. I still believe that the information in this post is valuable, and so I have chosen to republish it here.
Part of WordPress’s power is the fact that it is so extensible. The tools in the WordPress toolbox to achieve this are hooks, actions and filters. But some of the documentation can be very intimidating, so in less than 200 words I will provide you with a basic guide to hooks, actions and filters.
Hooks simply refer to where your custom code will be executed.
There are two types of hooks: action hooks and filter hooks.
Action hooks do something in your code. (You can either add or remove actions using the very handy and intuitive code: add_action or remove_action)
Filter hooks modify something in the code, so instead of doing something entirely new or different…it simply changes your code. The very intuitive code to add a filter is: add_filter.
That’s it, a very basic guide to hooks, actions and filters for WordPress.